diff options
author | Soeren Sandmann <sandmann@daimi.au.dk> | 2002-10-20 22:29:57 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2002-10-20 22:29:57 +0000 |
commit | 4b08e835a4be1d0678a380832d10ff9c72618866 (patch) | |
tree | ea10c94897e4ae07f8bdee1a7f084c8e5356a166 /gtk/gtkmenushell.c | |
parent | 817ad6d3f81db85ce8be1f9ec5453dc992904b6d (diff) | |
download | gtk+-4b08e835a4be1d0678a380832d10ff9c72618866.tar.gz |
gtkmenu.c, gtkmenubar.c, gtkmenuitem.c, gtkmenushell.c, gtkmenushell.h,
Sun Oct 20 23:58:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenubar.c, gtkmenuitem.c, gtkmenushell.c,
gtkmenushell.h, gtkmenushell.h
- make the delay before submenus appear below menu bars a
GtkSetting
- make the delay before submenus pops up a GtkSetting
- make the stay up triangle slightly larger
- don't pop up the first submenu immediately.
- make the default delay for submenus 225 ms, and 0 for menubars.
- make the default delay before popping down inside the stay-up
triangle 1000 ms
Fixes #74950
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r-- | gtk/gtkmenushell.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 6f90e6154c..683de2666b 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -1185,3 +1185,25 @@ gtk_real_menu_shell_cycle_focus (GtkMenuShell *menu_shell, if (menu_shell) _gtk_menu_bar_cycle_focus (GTK_MENU_BAR (menu_shell), dir); } + +gint +_gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell) +{ + GtkMenuShellClass *klass = GTK_MENU_SHELL_GET_CLASS (menu_shell); + + if (klass->get_popup_delay) + { + return klass->get_popup_delay (menu_shell); + } + else + { + gint popup_delay; + GtkWidget *widget = GTK_WIDGET (menu_shell); + + g_object_get (G_OBJECT (gtk_widget_get_settings (widget)), + "gtk-menu-popup-delay", &popup_delay, + NULL); + + return popup_delay; + } +} |