gvfs r1125 - in trunk: . client daemon programs
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1125 - in trunk: . client daemon programs
- Date: Mon, 14 Jan 2008 15:01:24 +0000 (GMT)
Author: alexl
Date: Mon Jan 14 15:01:23 2008
New Revision: 1125
URL: http://svn.gnome.org/viewvc/gvfs?rev=1125&view=rev
Log:
2008-01-14 Alexander Larsson <alexl redhat com>
* client/gdaemonfile.c:
* daemon/gvfsbackendlocaltest.c:
* daemon/gvfsbackendtrash.c:
* programs/gvfs-monitor-dir.c:
* programs/gvfs-monitor-file.c:
Update to new gio API
Modified:
trunk/ChangeLog
trunk/client/gdaemonfile.c
trunk/daemon/gvfsbackendlocaltest.c
trunk/daemon/gvfsbackendtrash.c
trunk/programs/gvfs-monitor-dir.c
trunk/programs/gvfs-monitor-file.c
Modified: trunk/client/gdaemonfile.c
==============================================================================
--- trunk/client/gdaemonfile.c (original)
+++ trunk/client/gdaemonfile.c Mon Jan 14 15:01:23 2008
@@ -1950,7 +1950,8 @@
static GFileMonitor*
g_daemon_file_monitor_dir (GFile* file,
GFileMonitorFlags flags,
- GCancellable *cancellable)
+ GCancellable *cancellable,
+ GError **error)
{
GFileMonitor *monitor;
char *obj_path;
@@ -1964,7 +1965,7 @@
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_CREATE_DIR_MONITOR,
&mount_info, NULL,
- cancellable, NULL,
+ cancellable, error,
DBUS_TYPE_UINT32, &flags_dbus,
0);
@@ -1981,7 +1982,8 @@
{
g_mount_info_unref (mount_info);
dbus_message_unref (reply);
- g_warning ("Invalid return value from monitor_dir");
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from monitor_dir"));
return NULL;
}
@@ -1997,7 +1999,8 @@
static GFileMonitor*
g_daemon_file_monitor_file (GFile* file,
GFileMonitorFlags flags,
- GCancellable *cancellable)
+ GCancellable *cancellable,
+ GError **error)
{
GFileMonitor *monitor;
char *obj_path;
@@ -2011,7 +2014,7 @@
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_CREATE_FILE_MONITOR,
&mount_info, NULL,
- cancellable, NULL,
+ cancellable, error,
DBUS_TYPE_UINT32, &flags_dbus,
0);
@@ -2028,7 +2031,8 @@
{
g_mount_info_unref (mount_info);
dbus_message_unref (reply);
- g_warning ("Invalid return value from monitor_dir");
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from monitor_file"));
return NULL;
}
Modified: trunk/daemon/gvfsbackendlocaltest.c
==============================================================================
--- trunk/daemon/gvfsbackendlocaltest.c (original)
+++ trunk/daemon/gvfsbackendlocaltest.c Mon Jan 14 15:01:23 2008
@@ -762,8 +762,8 @@
GFile *file = get_g_file_from_local (filename, G_VFS_JOB (job));
g_assert(file != NULL);
- if (is_dir_monitor) monitor = G_OBJECT(g_file_monitor_directory (file, flags, G_VFS_JOB (job)->cancellable));
- else monitor = G_OBJECT(g_file_monitor_file (file, flags, G_VFS_JOB (job)->cancellable));
+ if (is_dir_monitor) monitor = G_OBJECT(g_file_monitor_directory (file, flags, G_VFS_JOB (job)->cancellable, NULL));
+ else monitor = G_OBJECT(g_file_monitor_file (file, flags, G_VFS_JOB (job)->cancellable, NULL));
if (monitor)
{
Modified: trunk/daemon/gvfsbackendtrash.c
==============================================================================
--- trunk/daemon/gvfsbackendtrash.c (original)
+++ trunk/daemon/gvfsbackendtrash.c Mon Jan 14 15:01:23 2008
@@ -1402,7 +1402,7 @@
filesdir = g_build_filename (trashdir, "files", NULL);
file = g_file_new_for_path (filesdir);
g_free (filesdir);
- monitor = g_file_monitor_directory (file, 0, NULL);
+ monitor = g_file_monitor_directory (file, 0, NULL, NULL);
g_object_unref (file);
if (monitor)
@@ -1573,7 +1573,8 @@
monitor = g_file_monitor_directory (file,
flags,
- G_VFS_JOB (job)->cancellable);
+ G_VFS_JOB (job)->cancellable,
+ NULL);
if (monitor)
{
@@ -1648,7 +1649,8 @@
monitor = g_file_monitor_file (file,
flags,
- G_VFS_JOB (job)->cancellable);
+ G_VFS_JOB (job)->cancellable,
+ NULL);
if (monitor)
{
Modified: trunk/programs/gvfs-monitor-dir.c
==============================================================================
--- trunk/programs/gvfs-monitor-dir.c (original)
+++ trunk/programs/gvfs-monitor-dir.c Mon Jan 14 15:01:23 2008
@@ -98,7 +98,7 @@
if (argc > 1)
{
file = g_file_new_for_commandline_arg (argv[1]);
- dmonitor = g_file_monitor_directory (file, G_FILE_MONITOR_WATCH_MOUNTS, NULL);
+ dmonitor = g_file_monitor_directory (file, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL);
if (dmonitor != NULL)
g_signal_connect (dmonitor, "changed", (GCallback)dir_monitor_callback, NULL);
else
Modified: trunk/programs/gvfs-monitor-file.c
==============================================================================
--- trunk/programs/gvfs-monitor-file.c (original)
+++ trunk/programs/gvfs-monitor-file.c Mon Jan 14 15:01:23 2008
@@ -93,7 +93,7 @@
if (argc > 1)
{
file = g_file_new_for_commandline_arg (argv[1]);
- fmonitor = g_file_monitor_file (file, G_FILE_MONITOR_WATCH_MOUNTS, NULL);
+ fmonitor = g_file_monitor_file (file, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL);
g_signal_connect (fmonitor, "changed", (GCallback)file_monitor_callback, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]