[Xfce4-commits] <thunar:jannis/new-shortcuts-pane> Fix a leak and an issue with the action button disappearing on click.

Jannis Pohlmann noreply at xfce.org
Fri Jul 15 21:10:29 CEST 2011


Updating branch refs/heads/jannis/new-shortcuts-pane
         to e848b7a03fd81d08b42a27beb8f9e7113b9c3857 (commit)
       from dbb3dc260abe39579da5398f6496985d805ab33b (commit)

commit e848b7a03fd81d08b42a27beb8f9e7113b9c3857
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Wed Jun 8 02:52:01 2011 +0200

    Fix a leak and an issue with the action button disappearing on click.

 thunar/thunar-shortcut-row.c |   26 +++++++-------------------
 1 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/thunar/thunar-shortcut-row.c b/thunar/thunar-shortcut-row.c
index 4089e9f..1b92667 100644
--- a/thunar/thunar-shortcut-row.c
+++ b/thunar/thunar-shortcut-row.c
@@ -920,17 +920,10 @@ thunar_shortcut_row_button_clicked (ThunarShortcutRow *row,
         {
           /* something is out of sync... */
         }
-
-      /* release the mount operation */
-      g_object_unref (mount_operation);
-    }
-  else if (row->location != NULL)
-    {
-    }
-  else
-    {
-      _thunar_assert_not_reached ();
     }
+
+  /* release the mount operation */
+  g_object_unref (mount_operation);
 }
 
 
@@ -1342,10 +1335,11 @@ thunar_shortcut_row_set_spinning (ThunarShortcutRow     *row,
       gtk_button_set_image (GTK_BUTTON (row->action_button), row->action_image);
       gtk_spinner_stop (GTK_SPINNER (row->spinner));
       gtk_widget_hide (row->spinner);
-      gtk_widget_hide (row->action_button);
 
-      /* assume the volume has changed which will make the action button
-       * visible again if the volume or file is mounted and can be ejected */
+      /* assume the mount and volume have changed which will make 
+       * the action button visible again if the volume or mount is 
+       * mounted and can be ejected */
+      thunar_shortcut_row_mount_changed (row);
       thunar_shortcut_row_volume_changed (row);
     }
 }
@@ -1463,9 +1457,6 @@ thunar_shortcut_row_set_volume (ThunarShortcutRow *row,
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT_ROW (row));
   _thunar_return_if_fail (volume == NULL || G_IS_VOLUME (volume));
 
-  if (row->volume == volume)
-    return;
-
   if (row->volume != NULL)
     g_object_unref (row->volume);
 
@@ -1497,9 +1488,6 @@ thunar_shortcut_row_set_mount (ThunarShortcutRow *row,
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT_ROW (row));
   _thunar_return_if_fail (mount == NULL || G_IS_MOUNT (mount));
 
-  if (row->mount == mount)
-    return;
-
   if (row->mount != NULL)
     g_object_unref (row->mount);
 



More information about the Xfce4-commits mailing list