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.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
Fix problems with HandleBox and focusing - #78232
|
Fix problems with HandleBox and focusing - #78232
|
||||||
|
@ -416,16 +416,14 @@ window_key_press_handler (GtkWidget *widget,
|
|||||||
GTK_DIR_TAB_FORWARD, NULL);
|
GTK_DIR_TAB_FORWARD, NULL);
|
||||||
if (menubars)
|
if (menubars)
|
||||||
{
|
{
|
||||||
GtkMenuShell *menushell = GTK_MENU_SHELL (menubars->data);
|
GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
|
||||||
|
|
||||||
if (menushell->children)
|
_gtk_menu_shell_activate (menu_shell);
|
||||||
{
|
_gtk_menu_shell_select_first (menu_shell);
|
||||||
gtk_signal_emit_by_name (GTK_OBJECT (menushell->children->data),
|
|
||||||
"activate_item");
|
|
||||||
retval = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free (menubars);
|
g_list_free (menubars);
|
||||||
|
|
||||||
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,12 +779,7 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
|
|||||||
{
|
{
|
||||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget->parent);
|
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget->parent);
|
||||||
|
|
||||||
if (!menu_shell->active)
|
_gtk_menu_shell_activate (menu_shell);
|
||||||
{
|
|
||||||
gtk_grab_add (GTK_WIDGET (menu_shell));
|
|
||||||
menu_shell->have_grab = TRUE;
|
|
||||||
menu_shell->active = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_menu_shell_select_item (GTK_MENU_SHELL (widget->parent), widget);
|
gtk_menu_shell_select_item (GTK_MENU_SHELL (widget->parent), widget);
|
||||||
gtk_menu_item_popup_submenu (widget);
|
gtk_menu_item_popup_submenu (widget);
|
||||||
|
@ -440,6 +440,17 @@ gtk_menu_shell_realize (GtkWidget *widget)
|
|||||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gtk_menu_shell_activate (GtkMenuShell *menu_shell)
|
||||||
|
{
|
||||||
|
if (!menu_shell->active)
|
||||||
|
{
|
||||||
|
gtk_grab_add (GTK_WIDGET (menu_shell));
|
||||||
|
menu_shell->have_grab = TRUE;
|
||||||
|
menu_shell->active = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
gtk_menu_shell_button_press (GtkWidget *widget,
|
gtk_menu_shell_button_press (GtkWidget *widget,
|
||||||
GdkEventButton *event)
|
GdkEventButton *event)
|
||||||
@ -461,12 +472,8 @@ gtk_menu_shell_button_press (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
else if (!menu_shell->active || !menu_shell->button)
|
else if (!menu_shell->active || !menu_shell->button)
|
||||||
{
|
{
|
||||||
if (!menu_shell->active)
|
_gtk_menu_shell_activate (menu_shell);
|
||||||
{
|
|
||||||
gtk_grab_add (GTK_WIDGET (widget));
|
|
||||||
menu_shell->have_grab = TRUE;
|
|
||||||
menu_shell->active = TRUE;
|
|
||||||
}
|
|
||||||
menu_shell->button = event->button;
|
menu_shell->button = event->button;
|
||||||
|
|
||||||
menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent *)event);
|
menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent *)event);
|
||||||
|
@ -112,6 +112,7 @@ void gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
|
|||||||
gboolean force_deactivate);
|
gboolean force_deactivate);
|
||||||
|
|
||||||
void _gtk_menu_shell_select_first (GtkMenuShell *menu_shell);
|
void _gtk_menu_shell_select_first (GtkMenuShell *menu_shell);
|
||||||
|
void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user