diff options
author | Martin Wehner <martin.wehner@gmail.com> | 2006-02-23 19:48:00 +0000 |
---|---|---|
committer | Martin Wehner <mwehner@src.gnome.org> | 2006-02-23 19:48:00 +0000 |
commit | 71b61dd53236d536945eee6944987c266c866190 (patch) | |
tree | 004a2c24bc7ec4dcb5eadadc81e22ee8ee0e5acc /src/nautilus-places-sidebar.c | |
parent | 4bf1e729a652eb0c7d7dc1ecf3aa04c071ca94f1 (diff) | |
download | nautilus-71b61dd53236d536945eee6944987c266c866190.tar.gz |
Open the popup menu non-modal and pass the button event on to the tree
2006-02-23 Martin Wehner <martin.wehner@gmail.com>
* src/nautilus-places-sidebar.c: (bookmarks_popup_menu):
(bookmarks_button_press_event_cb):
Open the popup menu non-modal and pass the button event on to the
tree view. Makes a right click select the item under the cursor
before bringing up the menu. Fixes #329778.
Diffstat (limited to 'src/nautilus-places-sidebar.c')
-rw-r--r-- | src/nautilus-places-sidebar.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index 2101f5222..46cffc7f0 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -916,9 +916,10 @@ bookmarks_popup_menu (NautilusPlacesSidebar *sidebar, GdkEventButton *event) { bookmarks_update_popup_menu (sidebar); - gnome_popup_menu_do_popup_modal (sidebar->popup_menu, - NULL, NULL, event, NULL, - GTK_WIDGET (sidebar->tree_view)); + eel_pop_up_context_menu (GTK_MENU(sidebar->popup_menu), + EEL_DEFAULT_POPUP_MENU_DISPLACEMENT, + EEL_DEFAULT_POPUP_MENU_DISPLACEMENT, + event); } /* Callback used for the GtkWidget::popup-menu signal of the shortcuts list */ @@ -938,12 +939,10 @@ bookmarks_button_press_event_cb (GtkWidget *widget, GdkEventButton *event, NautilusPlacesSidebar *sidebar) { - if (event->button != 3) { - return FALSE; + if (event->button == 3) { + bookmarks_popup_menu (sidebar, event); } - - bookmarks_popup_menu (sidebar, event); - return TRUE; + return FALSE; } |