[gtk+] places sidebar: keep open variants sensitive



commit 0175cd8ae7ee66dda18ec09194137bf81f6f72bc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 13 12:44:17 2015 -0400

    places sidebar: keep open variants sensitive
    
    Add a separate action for "Open in Tab" and "Open in new window"
    so we can keep them enabled when we disable "Open" for the selected
    row.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754410

 gtk/gtkplacessidebar.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 7c3d52a..dc20ca4 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -3257,6 +3257,7 @@ on_key_press_event (GtkWidget        *widget,
 
 static GActionEntry entries[] = {
   { "open", open_shortcut_cb, "i", NULL, NULL },
+  { "open-other", open_shortcut_cb, "i", NULL, NULL },
   { "bookmark", add_shortcut_cb, NULL, NULL, NULL },
   { "remove", remove_shortcut_cb, NULL, NULL, NULL },
   { "rename", rename_shortcut_cb, NULL, NULL, NULL },
@@ -3325,7 +3326,7 @@ add_open_button (GtkWidget          *box,
 
   item = g_object_new (GTK_TYPE_MODEL_BUTTON,
                        "visible", TRUE,
-                       "action-name", "row.open",
+                       "action-name", flags == GTK_PLACES_OPEN_NORMAL ? "row.open" : "row.open-other",
                        "action-target", g_variant_new_int32 (flags),
                        "text", label,
                        NULL);


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