diff options
author | Michael Natterer <mitch@gimp.org> | 2005-03-31 17:02:19 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2005-03-31 17:02:19 +0000 |
commit | 91cb92c01882f7a3b1014c594908873fc18a936c (patch) | |
tree | e18e289edfbd0dd442fac1df3d3c4439223b29da /gtk/gtkmenushell.h | |
parent | 420878b21e654c49ade3b5670aed281beaeb2508 (diff) | |
download | gtk+-91cb92c01882f7a3b1014c594908873fc18a936c.tar.gz |
Allow to pop up menus without grabbing the keyboard. Useful for stuff like
2005-03-31 Michael Natterer <mitch@gimp.org>
Allow to pop up menus without grabbing the keyboard. Useful for
stuff like virtual keyboards. Fixes bug #159890
* gtk/gtk.symbols
* gtk/gtkmenushell.[ch]: added boolean property "take-focus"
and public API gtk_menu_shell_set/get_take_focus().
* gtk/gtkmenu.c (gtk_menu_popup)
(popup_grab_on_window): don't grab the keyboard if take_focus
is FALSE.
* gtk/gtkmenuitem.c (_gtk_menu_item_popup_submen): propagate the
parent menu_shell's take_focus property to the submenu which is
about to be popped up.
Diffstat (limited to 'gtk/gtkmenushell.h')
-rw-r--r-- | gtk/gtkmenushell.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkmenushell.h b/gtk/gtkmenushell.h index a0b48f4317..9a4b3a0147 100644 --- a/gtk/gtkmenushell.h +++ b/gtk/gtkmenushell.h @@ -115,12 +115,16 @@ void _gtk_menu_shell_activate (GtkMenuShell *menu_shell); gint _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell); void gtk_menu_shell_cancel (GtkMenuShell *menu_shell); -void _gtk_menu_shell_add_mnemonic (GtkMenuShell *menu_shell, - guint keyval, - GtkWidget *target); -void _gtk_menu_shell_remove_mnemonic (GtkMenuShell *menu_shell, - guint keyval, - GtkWidget *target); +void _gtk_menu_shell_add_mnemonic (GtkMenuShell *menu_shell, + guint keyval, + GtkWidget *target); +void _gtk_menu_shell_remove_mnemonic (GtkMenuShell *menu_shell, + guint keyval, + GtkWidget *target); + +gboolean gtk_menu_shell_get_take_focus (GtkMenuShell *menu_shell); +void gtk_menu_shell_set_take_focus (GtkMenuShell *menu_shell, + gboolean take_focus); G_END_DECLS |