diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-01-29 21:02:03 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-01-29 21:02:03 +0000 |
commit | f9a399961eea1e8385c068f52256d84fa35cfd3c (patch) | |
tree | 9e80d1e03db7749f8db121375c8b6b1265d3a259 /gtk/gtkmenushell.c | |
parent | c631fc658fcea15228cad509eca4d23d36e7758a (diff) | |
download | gdk-pixbuf-f9a399961eea1e8385c068f52256d84fa35cfd3c.tar.gz |
Make up from the menu bar go to the end of the submenu. (#96114, Ian
Wed Jan 29 15:43:56 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
Make up from the menu bar go to the end of the submenu.
(#96114, Ian Peters.)
* gtk/gtkmenuitem.c (gtk_menu_item_mnemonic_activate):
Only do the select-but-not-activate stuff if the
menu is already active. Otherwise, just activate.
(#101690, Arvind Samptur)
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r-- | gtk/gtkmenushell.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index b72c04d21..4b3fba1a4 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -1070,6 +1070,20 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell, gtk_menu_shell_select_submenu_first (parent_menu_shell); } } + /* If there is no parent and the submenu is in the opposite direction + * to the menu, then make the PARENT direction wrap around to + * the bottom of the submenu. + */ + else if (menu_shell->active_menu_item && + _gtk_menu_item_is_selectable (menu_shell->active_menu_item) && + GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu) + { + GtkMenuShell *submenu = GTK_MENU_SHELL (GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu); + + if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement != + GTK_MENU_SHELL_GET_CLASS (submenu)->submenu_placement) + _gtk_menu_shell_select_last (submenu, TRUE); + } break; case GTK_MENU_DIR_CHILD: |