gvfs r2038 - in branches/gnome-2-24: . monitor/hal monitor/proxy
- From: davidz svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2038 - in branches/gnome-2-24: . monitor/hal monitor/proxy
- Date: Mon, 29 Sep 2008 17:40:35 +0000 (UTC)
Author: davidz
Date: Mon Sep 29 17:40:35 2008
New Revision: 2038
URL: http://svn.gnome.org/viewvc/gvfs?rev=2038&view=rev
Log:
2008-09-29 David Zeuthen <davidz redhat com>
* monitor/hal/ghalvolume.c:
* monitor/hal/ghalvolumemonitor.[ch]:
* monitor/proxy/gproxyvolume.c:
Make sure we emit 'mount-added' when forcing an update for
completing a mount operation (#552168). Cherry-picked from trunk.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/monitor/hal/ghalvolume.c
branches/gnome-2-24/monitor/hal/ghalvolumemonitor.c
branches/gnome-2-24/monitor/hal/ghalvolumemonitor.h
branches/gnome-2-24/monitor/proxy/gproxyvolume.c
Modified: branches/gnome-2-24/monitor/hal/ghalvolume.c
==============================================================================
--- branches/gnome-2-24/monitor/hal/ghalvolume.c (original)
+++ branches/gnome-2-24/monitor/hal/ghalvolume.c Mon Sep 29 17:40:35 2008
@@ -760,9 +760,10 @@
GSimpleAsyncResult *simple;
/* ensure that the #GHalMount corrosponding to the #GHalVolume we've
- * mounted is made available before returning to the user
+ * mounted is made available before returning to the user (make sure
+ * we don't emit the signals in idle; see #552168).
*/
- g_hal_volume_monitor_force_update (G_HAL_VOLUME_MONITOR (G_HAL_VOLUME (data->object)->volume_monitor));
+ g_hal_volume_monitor_force_update (G_HAL_VOLUME_MONITOR (G_HAL_VOLUME (data->object)->volume_monitor), FALSE);
if (WEXITSTATUS (status) != 0)
{
Modified: branches/gnome-2-24/monitor/hal/ghalvolumemonitor.c
==============================================================================
--- branches/gnome-2-24/monitor/hal/ghalvolumemonitor.c (original)
+++ branches/gnome-2-24/monitor/hal/ghalvolumemonitor.c Mon Sep 29 17:40:35 2008
@@ -82,7 +82,8 @@
HalDevice *device,
gpointer user_data);
static void update_all (GHalVolumeMonitor *monitor,
- gboolean emit_changes);
+ gboolean emit_changes,
+ gboolean emit_in_idle);
static void update_drives (GHalVolumeMonitor *monitor,
GList **added_drives,
GList **removed_drives);
@@ -367,7 +368,7 @@
{
GHalVolumeMonitor *monitor = G_HAL_VOLUME_MONITOR (user_data);
- update_all (monitor, TRUE);
+ update_all (monitor, TRUE, TRUE);
}
static void
@@ -376,13 +377,13 @@
{
GHalVolumeMonitor *monitor = G_HAL_VOLUME_MONITOR (user_data);
- update_all (monitor, TRUE);
+ update_all (monitor, TRUE, TRUE);
}
void
-g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor)
+g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor, gboolean emit_in_idle)
{
- update_all (monitor, TRUE);
+ update_all (monitor, TRUE, emit_in_idle);
}
static void
@@ -394,7 +395,7 @@
/*g_warning ("hal changed");*/
- update_all (monitor, TRUE);
+ update_all (monitor, TRUE, TRUE);
}
static GObject *
@@ -448,7 +449,7 @@
"device_removed", G_CALLBACK (hal_changed),
monitor);
- update_all (monitor, FALSE);
+ update_all (monitor, FALSE, TRUE);
G_LOCK (hal_vm);
the_volume_monitor = monitor;
@@ -973,7 +974,8 @@
/* Must be called from idle if emit_changes, with no locks held */
static void
update_all (GHalVolumeMonitor *monitor,
- gboolean emit_changes)
+ gboolean emit_changes,
+ gboolean emit_in_idle)
{
ChangedLists *lists;
GList *added_drives, *removed_drives;
@@ -1007,7 +1009,10 @@
lists->added_mounts = added_mounts;
lists->removed_mounts = removed_mounts;
- g_idle_add (emit_lists_in_idle, lists);
+ if (emit_in_idle)
+ g_idle_add (emit_lists_in_idle, lists);
+ else
+ emit_lists_in_idle (lists);
}
else
{
Modified: branches/gnome-2-24/monitor/hal/ghalvolumemonitor.h
==============================================================================
--- branches/gnome-2-24/monitor/hal/ghalvolumemonitor.h (original)
+++ branches/gnome-2-24/monitor/hal/ghalvolumemonitor.h Mon Sep 29 17:40:35 2008
@@ -51,7 +51,8 @@
GType g_hal_volume_monitor_get_type (void) G_GNUC_CONST;
GVolumeMonitor *g_hal_volume_monitor_new (void);
-void g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor);
+void g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor,
+ gboolean emit_in_idle);
G_END_DECLS
Modified: branches/gnome-2-24/monitor/proxy/gproxyvolume.c
==============================================================================
--- branches/gnome-2-24/monitor/proxy/gproxyvolume.c (original)
+++ branches/gnome-2-24/monitor/proxy/gproxyvolume.c Mon Sep 29 17:40:35 2008
@@ -539,7 +539,7 @@
data->callback,
data->user_data,
NULL);
- g_simple_async_result_complete (simple);
+ g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
g_object_unref (data->object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]