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
This commit is contained in:
Matthias Clasen 2015-09-13 12:44:17 -04:00
parent 2b3a116ef7
commit 0175cd8ae7

View File

@ -3257,6 +3257,7 @@ on_key_press_event (GtkWidget *widget,
static GActionEntry entries[] = { static GActionEntry entries[] = {
{ "open", open_shortcut_cb, "i", NULL, NULL }, { "open", open_shortcut_cb, "i", NULL, NULL },
{ "open-other", open_shortcut_cb, "i", NULL, NULL },
{ "bookmark", add_shortcut_cb, NULL, NULL, NULL }, { "bookmark", add_shortcut_cb, NULL, NULL, NULL },
{ "remove", remove_shortcut_cb, NULL, NULL, NULL }, { "remove", remove_shortcut_cb, NULL, NULL, NULL },
{ "rename", rename_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, item = g_object_new (GTK_TYPE_MODEL_BUTTON,
"visible", TRUE, "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), "action-target", g_variant_new_int32 (flags),
"text", label, "text", label,
NULL); NULL);