summaryrefslogtreecommitdiff
path: root/gtk/gtkmenushell.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-03-17 21:17:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-03-17 21:18:31 -0400
commit6ad8909e3c141f6311b980f3addf04859fa2efd7 (patch)
treeeda2aae369a77459f71cb74eef2dd2eb9a857482 /gtk/gtkmenushell.c
parent3a65f554c57a6b83e041bbe3ef2da9770638ec5a (diff)
downloadgtk+-6ad8909e3c141f6311b980f3addf04859fa2efd7.tar.gz
Make menu scrolling work with auto mnemonics
The menu scrolling code is not robust against menu repositioning so we have avoid causing unnecessary recalculations of labels in parent menuitems.
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r--gtk/gtkmenushell.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 710f835be8..c3e107fa1c 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1168,7 +1168,11 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
{
GtkPackDirection pack_dir = PACK_DIRECTION (menu_shell);
- gtk_menu_shell_deselect (menu_shell);
+ if (menu_shell->active_menu_item)
+ {
+ gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
+ menu_shell->active_menu_item = NULL;
+ }
if (!_gtk_menu_item_is_selectable (menu_item))
{