Commit 4e84b666 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

When a menubar is up, use F10 to cycle menubars, not Control-Tab (#87159,

Thu Jul 25 14:14:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
        menubars, not Control-Tab (#87159, Calum Benson. Patch from
        Padraig O'Briain.)

        * gtk/gtkmenubar.c: When cycling menu bars, cancel
        after the last instead of wrapping around.
parent eccc0760
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
Thu Jul 25 14:14:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
menubars, not Control-Tab (#87159, Calum Benson. Patch from
Padraig O'Briain.)
* gtk/gtkmenubar.c: When cycling menu bars, cancel
after the last instead of wrapping around.
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
[ Patch from Padraig O'Briain, #87904 ]
......
......@@ -532,13 +532,13 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
GtkDirectionType dir)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menubar));
GtkMenuItem *to_activate = NULL;
if (GTK_WIDGET_TOPLEVEL (toplevel))
{
GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (toplevel));
GList *menubars;
GList *current;
GtkMenuBar *new;
menubars = _gtk_container_focus_sort (GTK_CONTAINER (toplevel), tmp_menubars,
dir, GTK_WIDGET (menubar));
......@@ -547,26 +547,22 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
if (menubars)
{
current = g_list_find (menubars, menubar);
if (current && current->next)
new = current->next->data;
else
new = menubars->data;
if (new != menubar)
{
GtkMenuShell *new_menushell = GTK_MENU_SHELL (new);
GtkMenuShell *new_menushell = GTK_MENU_SHELL (current->next->data);
if (new_menushell->children)
{
g_signal_emit_by_name (menubar, "cancel", 0);
gtk_signal_emit_by_name (GTK_OBJECT (new_menushell->children->data),
"activate_item");
}
to_activate = new_menushell->children->data;
}
}
g_list_free (menubars);
}
g_signal_emit_by_name (menubar, "cancel", 0);
if (to_activate)
g_signal_emit_by_name (to_activate, "activate_item");
}
static GtkShadowType
......
......@@ -320,19 +320,11 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
GTK_TYPE_BOOL,
FALSE);
gtk_binding_entry_add_signal (binding_set,
GDK_Tab, GDK_CONTROL_MASK,
GDK_F10, 0,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Tab, GDK_CONTROL_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_Tab, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Tab, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
GDK_F10, GDK_SHIFT_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment