mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
ed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenubar.c: When fetching the menubars for the window for F10 handling, only add viewable menu bars. (Apparently, people sometimes put menu bars in notebook pages!) (Tim Janik, #82627)
This commit is contained in:
parent
e9ed9a7fa1
commit
a01645c84f
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Wed Jun 12 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c: When fetching the menubars for
|
||||
the window for F10 handling, only add viewable menu
|
||||
bars. (Apparently, people sometimes put menu bars
|
||||
in notebook pages!) (Tim Janik, #82627)
|
||||
|
||||
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
|
||||
|
@ -372,6 +372,34 @@ get_menu_bars (GtkWindow *window)
|
||||
return g_object_get_data (G_OBJECT (window), "gtk-menu-bar-list");
|
||||
}
|
||||
|
||||
static GList *
|
||||
get_viewable_menu_bars (GtkWindow *window)
|
||||
{
|
||||
GList *menu_bars;
|
||||
GList *viewable_menu_bars = NULL;
|
||||
|
||||
for (menu_bars = get_menu_bars (window);
|
||||
menu_bars;
|
||||
menu_bars = menu_bars->next)
|
||||
{
|
||||
GtkWidget *widget = menu_bars->data;
|
||||
gboolean viewable = TRUE;
|
||||
|
||||
while (widget)
|
||||
{
|
||||
if (!GTK_WIDGET_MAPPED (widget))
|
||||
viewable = FALSE;
|
||||
|
||||
widget = widget->parent;
|
||||
}
|
||||
|
||||
if (viewable)
|
||||
viewable_menu_bars = g_list_prepend (viewable_menu_bars, menu_bars->data);
|
||||
}
|
||||
|
||||
return g_list_reverse (viewable_menu_bars);
|
||||
}
|
||||
|
||||
static void
|
||||
set_menu_bars (GtkWindow *window,
|
||||
GList *menubars)
|
||||
@ -410,10 +438,13 @@ window_key_press_handler (GtkWidget *widget,
|
||||
((event->state & gtk_accelerator_get_default_mod_mask ()) ==
|
||||
(mods & gtk_accelerator_get_default_mod_mask ())))
|
||||
{
|
||||
GList *menubars = get_menu_bars (GTK_WINDOW (widget));
|
||||
GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (widget));
|
||||
GList *menubars;
|
||||
|
||||
menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), menubars,
|
||||
menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), tmp_menubars,
|
||||
GTK_DIR_TAB_FORWARD, NULL);
|
||||
g_list_free (tmp_menubars);
|
||||
|
||||
if (menubars)
|
||||
{
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
|
||||
@ -504,12 +535,14 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
|
||||
|
||||
if (GTK_WIDGET_TOPLEVEL (toplevel))
|
||||
{
|
||||
GList *menubars = get_menu_bars (GTK_WINDOW (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), menubars,
|
||||
menubars = _gtk_container_focus_sort (GTK_CONTAINER (toplevel), tmp_menubars,
|
||||
dir, GTK_WIDGET (menubar));
|
||||
g_list_free (tmp_menubars);
|
||||
|
||||
if (menubars)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user