summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-05-08 16:01:45 +0200
committerAlexander Larsson <alexl@redhat.com>2009-05-08 16:01:45 +0200
commitd0a339d10b789c53352b61b291eb55d67f770254 (patch)
tree43b6e46956112949cefa9c467cdf65821ba81658 /monitor
parente4cca36cab78b1951db5e7aa7f590599a5d5c290 (diff)
downloadgvfs-d0a339d10b789c53352b61b291eb55d67f770254.tar.gz
Emit the new pre-unmount signal on GMounts (#576105)
Diffstat (limited to 'monitor')
-rw-r--r--monitor/proxy/gproxyshadowmount.c11
-rw-r--r--monitor/proxy/gproxyvolumemonitor.c5
2 files changed, 9 insertions, 7 deletions
diff --git a/monitor/proxy/gproxyshadowmount.c b/monitor/proxy/gproxyshadowmount.c
index c55b14f2..e3cb42ee 100644
--- a/monitor/proxy/gproxyshadowmount.c
+++ b/monitor/proxy/gproxyshadowmount.c
@@ -113,12 +113,11 @@ g_proxy_shadow_mount_init (GProxyShadowMount *proxy_shadow_mount)
}
static void
-real_mount_pre_unmount_cb (GVolumeMonitor *volume_monitor,
- GMount *mount,
+real_mount_pre_unmount_cb (GMount *real_mount,
GProxyShadowMount *shadow_mount)
{
- if (mount == shadow_mount->real_mount)
- g_signal_emit_by_name (shadow_mount->volume_monitor, "mount-pre-unmount", shadow_mount);
+ g_signal_emit_by_name (shadow_mount, "pre-unmount", 0);
+ g_signal_emit_by_name (shadow_mount->volume_monitor, "mount-pre-unmount", shadow_mount);
}
void
@@ -133,7 +132,7 @@ g_proxy_shadow_mount_remove (GProxyShadowMount *mount)
if (mount->pre_unmount_signal_id != 0)
{
- g_signal_handler_disconnect (mount->volume_monitor,
+ g_signal_handler_disconnect (mount->real_mount,
mount->pre_unmount_signal_id);
mount->pre_unmount_signal_id = 0;
}
@@ -168,7 +167,7 @@ g_proxy_shadow_mount_new (GProxyVolumeMonitor *volume_monitor,
signal_emit_in_idle (mount->real_mount, "changed", NULL);
signal_emit_in_idle (mount->volume_monitor, "mount-changed", mount->real_mount);
- mount->pre_unmount_signal_id = g_signal_connect (mount->volume_monitor, "mount-pre-unmount",
+ mount->pre_unmount_signal_id = g_signal_connect (mount->real_mount, "pre-unmount",
G_CALLBACK (real_mount_pre_unmount_cb), mount);
g_object_set_data (G_OBJECT (mount),
diff --git a/monitor/proxy/gproxyvolumemonitor.c b/monitor/proxy/gproxyvolumemonitor.c
index 662a6d64..aa79460c 100644
--- a/monitor/proxy/gproxyvolumemonitor.c
+++ b/monitor/proxy/gproxyvolumemonitor.c
@@ -815,7 +815,10 @@ filter_function (DBusConnection *connection, DBusMessage *message, void *user_da
{
mount = g_hash_table_lookup (monitor->mounts, id);
if (mount != NULL)
- signal_emit_in_idle (monitor, "mount-pre-unmount", mount);
+ {
+ signal_emit_in_idle (mount, "pre-unmount", NULL);
+ signal_emit_in_idle (monitor, "mount-pre-unmount", mount);
+ }
}
else if (strcmp (member, "MountRemoved") == 0)
{