diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-04-11 14:28:11 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-04-11 14:28:11 +0000 |
commit | 03498ba24f32b68ae7d717724c5e27260559fcef (patch) | |
tree | 57d5853aa39486a9da9171b1182bd4112557969f /gtk/gtkmenubar.c | |
parent | 631b8da93e5f6d571e67f9508d14f019191f8f12 (diff) | |
download | gtk+-03498ba24f32b68ae7d717724c5e27260559fcef.tar.gz |
Export private _gtk_menu_shell_activate() to encapsulate cut-and-paste
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
private _gtk_menu_shell_activate() to encapsulate
cut-and-paste code.
* gtk/gtkmenubar.c: Select the first item on the menu bar
for F10 rather than acting as if the user pressed <Alt>F
to select the file manager.
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index fc45328df1..47975af2c8 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -416,16 +416,14 @@ window_key_press_handler (GtkWidget *widget, GTK_DIR_TAB_FORWARD, NULL); if (menubars) { - GtkMenuShell *menushell = GTK_MENU_SHELL (menubars->data); + GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data); - if (menushell->children) - { - gtk_signal_emit_by_name (GTK_OBJECT (menushell->children->data), - "activate_item"); - retval = TRUE; - } + _gtk_menu_shell_activate (menu_shell); + _gtk_menu_shell_select_first (menu_shell); g_list_free (menubars); + + retval = TRUE; } } |