diff options
Diffstat (limited to 'gtk/gtkplacessidebar.c')
-rw-r--r-- | gtk/gtkplacessidebar.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 322b7f1542..3b20ff6106 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -249,6 +249,7 @@ static gboolean on_button_press_event (GtkWidget *widget, static gboolean on_button_release_event (GtkWidget *widget, GdkEventButton *event, GtkSidebarRow *sidebar); +static void popup_menu_cb (GtkSidebarRow *row); static void stop_drop_feedback (GtkPlacesSidebar *sidebar); @@ -3215,6 +3216,15 @@ on_key_press_event (GtkWidget *widget, rename_bookmark (GTK_SIDEBAR_ROW (row)); return TRUE; } + + if ((event->keyval == GDK_KEY_Menu) || + ((event->keyval == GDK_KEY_F10) && + (event->state & modifiers) == GDK_SHIFT_MASK)) + + { + popup_menu_cb (GTK_SIDEBAR_ROW (row)); + return TRUE; + } } } @@ -3495,6 +3505,17 @@ on_button_release_event (GtkWidget *widget, return ret; } +static void +popup_menu_cb (GtkSidebarRow *row) +{ + GtkPlacesSidebarPlaceType row_type; + + g_object_get (row, "place-type", &row_type, NULL); + + if (row_type != PLACES_CONNECT_TO_SERVER) + bookmarks_popup_menu (row, NULL); +} + static gint list_box_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2, |