#include "config.h"
#include <glib.h>
#include <gio/gio.h>
#include "ev-file-monitor.h"
Go to the source code of this file.
static void ev_file_monitor_changed_cb |
( |
GFileMonitor * |
monitor, |
|
|
GFile * |
file, |
|
|
GFile * |
other_file, |
|
|
GFileMonitorEvent |
event_type, |
|
|
EvFileMonitor * |
ev_monitor |
|
) |
| |
|
static |
Definition at line 126 of file ev-file-monitor.c.
132 switch (event_type) {
133 case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
138 case G_FILE_MONITOR_EVENT_CHANGED:
Definition at line 79 of file ev-file-monitor.c.
81 GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
89 g_signal_new (
"changed",
94 g_cclosure_marshal_VOID__VOID,
static void ev_file_monitor_finalize |
( |
GObject * |
object) | |
|
|
static |
Definition at line 61 of file ev-file-monitor.c.
67 if (ev_monitor->priv->monitor) {
68 g_signal_handlers_disconnect_by_func (ev_monitor->priv->monitor,
71 g_object_unref (ev_monitor->priv->monitor);
72 ev_monitor->priv->monitor = NULL;
75 G_OBJECT_CLASS (ev_file_monitor_parent_class)->finalize (
object);
Definition at line 147 of file ev-file-monitor.c.
151 GError *error = NULL;
155 file = g_file_new_for_uri (uri);
156 ev_monitor->priv->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, &error);
157 if (ev_monitor->priv->monitor) {
158 g_signal_connect (ev_monitor->priv->monitor,
"changed",
161 g_warning (
"%s", error->message);
162 g_error_free (error);
165 g_object_unref (file);
static void ev_file_monitor_timeout_start |
( |
EvFileMonitor * |
ev_monitor) | |
|
|
static |
Definition at line 108 of file ev-file-monitor.c.
112 ev_monitor->priv->timeout_id =
113 g_timeout_add_seconds (5, (GSourceFunc)
timeout_cb, ev_monitor);
static void ev_file_monitor_timeout_stop |
( |
EvFileMonitor * |
ev_monitor) | |
|
|
static |
Definition at line 117 of file ev-file-monitor.c.
119 if (ev_monitor->priv->timeout_id > 0) {
120 g_source_remove (ev_monitor->priv->timeout_id);
121 ev_monitor->priv->timeout_id = 0;