[Xfce4-commits] <thunar:master> Emit pre-unmount asap.

Nick Schermer noreply at xfce.org
Sat Oct 13 16:12:40 CEST 2012


Updating branch refs/heads/master
         to f7ad8626aa84df1cd2e474a05dc053624be4039e (commit)
       from 6899eff311c42bff7f2a2e59b07f85b815f8d335 (commit)

commit f7ad8626aa84df1cd2e474a05dc053624be4039e
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Oct 13 15:32:32 2012 +0200

    Emit pre-unmount asap.
    
    This is going to happen anyway, so emit before we even try, so
    the view nicely jump to home.

 thunar/thunar-device.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/thunar/thunar-device.c b/thunar/thunar-device.c
index 77cb530..5ff1154 100644
--- a/thunar/thunar-device.c
+++ b/thunar/thunar-device.c
@@ -269,9 +269,6 @@ thunar_device_mount_unmount_finish (GObject      *object,
   thunar_notify_unmount_finish (G_MOUNT (object));
 #endif
 
-  /* make sure this event happened */
-  thunar_device_operation_emit_pre_unmount (operation);
-
   /* finish the unmount */
   if (!g_mount_unmount_with_operation_finish (G_MOUNT (object), result, &error))
     {
@@ -306,9 +303,6 @@ thunar_device_mount_eject_finish (GObject      *object,
   thunar_notify_unmount_finish (G_MOUNT (object));
 #endif
 
-  /* make sure this event happened */
-  thunar_device_operation_emit_pre_unmount (operation);
-
   /* finish the eject */
   if (!g_mount_eject_with_operation_finish (G_MOUNT (object), result, &error))
     {
@@ -375,9 +369,6 @@ thunar_device_volume_eject_finish (GObject      *object,
   thunar_notify_eject_finish (G_VOLUME (object));
 #endif
 
-  /* make sure this event happened */
-  thunar_device_operation_emit_pre_unmount (operation);
-
   /* finish the eject */
   if (!g_volume_eject_with_operation_finish (G_VOLUME (object), result, &error))
     {
@@ -738,6 +729,7 @@ thunar_device_unmount (ThunarDevice         *device,
 
           /* try unmounting the mount */
           operation = thunar_device_operation_new (device, callback, user_data);
+          thunar_device_operation_emit_pre_unmount (operation);
           g_mount_unmount_with_operation (mount,
                                           G_MOUNT_UNMOUNT_NONE,
                                           mount_operation,
@@ -786,6 +778,7 @@ thunar_device_eject (ThunarDevice         *device,
 
           /* try ejecting the volume */
           operation = thunar_device_operation_new (device, callback, user_data);
+          thunar_device_operation_emit_pre_unmount (operation);
           g_volume_eject_with_operation (volume,
                                          G_MOUNT_UNMOUNT_NONE,
                                          mount_operation,
@@ -820,6 +813,7 @@ thunar_device_eject (ThunarDevice         *device,
 
           /* try ejecting the mount */
           operation = thunar_device_operation_new (device, callback, user_data);
+          thunar_device_operation_emit_pre_unmount (operation);
           g_mount_eject_with_operation (mount,
                                         G_MOUNT_UNMOUNT_NONE,
                                         mount_operation,
@@ -835,6 +829,7 @@ thunar_device_eject (ThunarDevice         *device,
 
           /* try unmounting the mount */
           operation = thunar_device_operation_new (device, callback, user_data);
+          thunar_device_operation_emit_pre_unmount (operation);
           g_mount_unmount_with_operation (mount,
                                           G_MOUNT_UNMOUNT_NONE,
                                           mount_operation,


More information about the Xfce4-commits mailing list