[gtk+] places sidebar: Disable 'Open' for selected rows



commit 90bcde5951c90f27e0b362d4689e1c2afdc0860c
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 1 22:05:46 2015 -0400

    places sidebar: Disable 'Open' for selected rows
    
    If the row is selected, it is already opened, so we should not
    offer the Open action anymore.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754410

 gtk/gtkplacessidebar.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index e997e6b..7c3d52a 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -2081,6 +2081,8 @@ check_popover_sensitivity (GtkSidebarRow *row,
   action = g_action_map_lookup_action (G_ACTION_MAP (actions), "rename");
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), (type == PLACES_BOOKMARK ||
                                                           type == PLACES_XDG_DIR));
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "open");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), !gtk_list_box_row_is_selected (GTK_LIST_BOX_ROW 
(row)));
 
   check_visibility (mount, volume, drive,
                     &show_mount, &show_unmount, &show_eject, &show_rescan, &show_start, &show_stop);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]