diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-03-01 01:05:11 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-03-01 01:05:11 +0000 |
commit | fce84d0535303ac78fc30f664eb7ca2f92c2a278 (patch) | |
tree | 9f3fd06fc6dc5a866f0ce7fba6a577b200344212 /gtk/gtkmenuitem.c | |
parent | 8b26dc2cf15f61301974ba0ebd44dcd510ad75d3 (diff) | |
download | gdk-pixbuf-fce84d0535303ac78fc30f664eb7ca2f92c2a278.tar.gz |
include gdkkeysysms.h if compiling gdk_keyval_convert_case.
Thu Feb 28 19:55:01 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkkeys.c: include gdkkeysysms.h if
compiling gdk_keyval_convert_case.
* gtk/gtkmenubar.c (gtk_menu_bar_cycle_focus): Implement
<Control>Tab <Control><Shift>Tab to cycle between
all menu bars in a toplevel once one is up.
* tests/testgtk.c: Add a second menubar, this
example is already full of crack anyways.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Padd
unhandled events up to the parent menu shell.
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Only
pop up the menu if the parent menu shell is still active.
* gtk/gtkcontainer.[ch] (_gtk_container_focus_sort): Add a
old_focus argument, export privately.
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r-- | gtk/gtkmenuitem.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 7185df8e7..2735a5c14 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -809,14 +809,20 @@ static gint gtk_menu_item_select_timeout (gpointer data) { GtkMenuItem *menu_item; + GtkWidget *parent; GDK_THREADS_ENTER (); menu_item = GTK_MENU_ITEM (data); - - gtk_menu_item_popup_submenu (data); - if (menu_item->timer_from_keypress && menu_item->submenu) - GTK_MENU_SHELL (menu_item->submenu)->ignore_enter = TRUE; + + parent = GTK_WIDGET (menu_item)->parent; + + if (parent && GTK_IS_MENU_SHELL (parent) && GTK_MENU_SHELL (parent)->active) + { + gtk_menu_item_popup_submenu (data); + if (menu_item->timer_from_keypress && menu_item->submenu) + GTK_MENU_SHELL (menu_item->submenu)->ignore_enter = TRUE; + } GDK_THREADS_LEAVE (); |