mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Build test subdir after . Remove gdirectorymonitor.[ch]
2008-01-07 Alexander Larsson <alexl@redhat.com> * Makefile.am: Build test subdir after . Remove gdirectorymonitor.[ch] * gdirectorymonitor.[ch]: * gfilemonitor.c: * gfile.[ch]: * gio.h: Remove GDirectoryMonitor and make GFileMonitor the baseclass for both file and directory monitors. Lift the more generic rate limiting code from GDirectoryMonitor into GFileMonitor. * fam/fam-helper.c: * fam/gfamdirectorymonitor.[ch]: * inotify/ginotifydirectorymonitor.[ch]: * inotify/inotify-helper.c: * glocaldirectorymonitor.[ch]: * glocalfile.c: * gvolumemonitor.c: Update for the removed GDirectoryMonitor. * gmemoryoutputstream.c: Remove ununsed variable svn path=/trunk/; revision=6262
This commit is contained in:
committed by
Alexander Larsson
parent
052c660452
commit
e23140cbb4
@@ -39,7 +39,7 @@ struct _GInotifyDirectoryMonitor
|
||||
inotify_sub *sub;
|
||||
};
|
||||
|
||||
static gboolean g_inotify_directory_monitor_cancel (GDirectoryMonitor* monitor);
|
||||
static gboolean g_inotify_directory_monitor_cancel (GFileMonitor* monitor);
|
||||
|
||||
#define g_inotify_directory_monitor_get_type _g_inotify_directory_monitor_get_type
|
||||
G_DEFINE_TYPE (GInotifyDirectoryMonitor, g_inotify_directory_monitor, G_TYPE_LOCAL_DIRECTORY_MONITOR)
|
||||
@@ -109,7 +109,7 @@ static void
|
||||
g_inotify_directory_monitor_class_init (GInotifyDirectoryMonitorClass* klass)
|
||||
{
|
||||
GObjectClass* gobject_class = G_OBJECT_CLASS (klass);
|
||||
GDirectoryMonitorClass *directory_monitor_class = G_DIRECTORY_MONITOR_CLASS (klass);
|
||||
GFileMonitorClass *directory_monitor_class = G_FILE_MONITOR_CLASS (klass);
|
||||
GLocalDirectoryMonitorClass *local_directory_monitor_class = G_LOCAL_DIRECTORY_MONITOR_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = g_inotify_directory_monitor_finalize;
|
||||
@@ -128,7 +128,7 @@ g_inotify_directory_monitor_init (GInotifyDirectoryMonitor* monitor)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_inotify_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
||||
g_inotify_directory_monitor_cancel (GFileMonitor* monitor)
|
||||
{
|
||||
GInotifyDirectoryMonitor *inotify_monitor = G_INOTIFY_DIRECTORY_MONITOR (monitor);
|
||||
inotify_sub *sub = inotify_monitor->sub;
|
||||
@@ -139,8 +139,8 @@ g_inotify_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
||||
inotify_monitor->sub = NULL;
|
||||
}
|
||||
|
||||
if (G_DIRECTORY_MONITOR_CLASS (g_inotify_directory_monitor_parent_class)->cancel)
|
||||
(*G_DIRECTORY_MONITOR_CLASS (g_inotify_directory_monitor_parent_class)->cancel) (monitor);
|
||||
if (G_FILE_MONITOR_CLASS (g_inotify_directory_monitor_parent_class)->cancel)
|
||||
(*G_FILE_MONITOR_CLASS (g_inotify_directory_monitor_parent_class)->cancel) (monitor);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <string.h>
|
||||
#include <gio/gdirectorymonitor.h>
|
||||
#include "glocaldirectorymonitor.h"
|
||||
#include "giomodule.h"
|
||||
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#endif
|
||||
#include <gio/glocalfile.h>
|
||||
#include <gio/gfilemonitor.h>
|
||||
#include <gio/gdirectorymonitor.h>
|
||||
#include "inotify-helper.h"
|
||||
#include "inotify-missing.h"
|
||||
#include "inotify-path.h"
|
||||
@@ -168,18 +167,8 @@ ih_event_callback (ik_event_t *event, inotify_sub *sub)
|
||||
child = g_file_new_for_path (fullpath);
|
||||
g_free (fullpath);
|
||||
|
||||
if (G_IS_DIRECTORY_MONITOR (sub->user_data))
|
||||
{
|
||||
GDirectoryMonitor* monitor = G_DIRECTORY_MONITOR (sub->user_data);
|
||||
g_directory_monitor_emit_event (monitor,
|
||||
child, NULL, eflags);
|
||||
}
|
||||
else if (G_IS_FILE_MONITOR (sub->user_data))
|
||||
{
|
||||
GFileMonitor* monitor = G_FILE_MONITOR (sub->user_data);
|
||||
g_file_monitor_emit_event (monitor,
|
||||
child, NULL, eflags);
|
||||
}
|
||||
g_file_monitor_emit_event (G_FILE_MONITOR (sub->user_data),
|
||||
child, NULL, eflags);
|
||||
|
||||
g_object_unref (child);
|
||||
g_object_unref (parent);
|
||||
@@ -217,17 +206,8 @@ ih_not_missing_callback (inotify_sub *sub)
|
||||
child = g_file_new_for_path (fullpath);
|
||||
g_free (fullpath);
|
||||
|
||||
if (G_IS_DIRECTORY_MONITOR (sub->user_data))
|
||||
{
|
||||
GDirectoryMonitor* monitor = G_DIRECTORY_MONITOR (sub->user_data);
|
||||
g_directory_monitor_emit_event (monitor, child, NULL, eflags);
|
||||
}
|
||||
else if (G_IS_FILE_MONITOR (sub->user_data))
|
||||
{
|
||||
GFileMonitor* monitor = G_FILE_MONITOR (sub->user_data);
|
||||
g_file_monitor_emit_event (monitor,
|
||||
child, NULL, eflags);
|
||||
}
|
||||
g_file_monitor_emit_event (G_FILE_MONITOR (sub->user_data),
|
||||
child, NULL, eflags);
|
||||
|
||||
g_object_unref (child);
|
||||
g_object_unref (parent);
|
||||
|
Reference in New Issue
Block a user