aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-08 03:32:17 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-08 03:32:17 +0800
commit934fafce5581c0cff57a9712d0816557a3f61f34 (patch)
tree4a7c31c7565a8987b33dd1850abd8d28bb65b21d /lib
parent10b9e346654223940392f8c9e19b77b552e5ba79 (diff)
downloadgsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar.gz
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar.bz2
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar.lz
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar.xz
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.tar.zst
gsoc2013-epiphany-934fafce5581c0cff57a9712d0816557a3f61f34.zip
When popping up the context menu with keyboard, select the first menu
2004-11-07 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-node-view.c: (ephy_node_view_popup): * src/bookmarks/ephy-bookmark-action.c: (show_context_menu), (popup_menu_cb), (button_press_cb): * src/bookmarks/ephy-topic-action.c: (button_toggled_cb), (show_context_menu), (popup_menu_cb), (button_press_cb): * src/ephy-window.c: (show_embed_popup): When popping up the context menu with keyboard, select the first menu item. Fixes bug #154907.
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-node-view.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 2a0ec2d6f..2f3df35e7 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -1581,14 +1581,19 @@ ephy_node_view_popup (EphyNodeView *view, GtkWidget *menu)
{
if (event->type == GDK_KEY_PRESS)
{
+ GdkEventKey *key = (GdkEventKey *) event;
+
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
ephy_gui_menu_position_tree_selection,
- view, 2, gtk_get_current_event_time ());
+ view, 0, key->time);
+ gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
}
- else
+ else if (event->type == GDK_BUTTON_PRESS)
{
+ GdkEventButton *button = (GdkEventButton *) event;
+
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL,
- NULL, 2, gtk_get_current_event_time ());
+ NULL, button->button, button->time);
}
gdk_event_free (event);