[gtk+/native-layout] Make menu scrolling work with auto mnemonics
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Make menu scrolling work with auto mnemonics
- Date: Sun, 4 Apr 2010 02:42:45 +0000 (UTC)
commit 643c7c20608fc15ecf1d6eb12b9e9ff29cf2fc65
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 17 21:17:38 2010 -0400
Make menu scrolling work with auto mnemonics
The menu scrolling code is not robust against menu repositioning so
we have avoid causing unnecessary recalculations of labels in parent
menuitems.
gtk/gtkmenushell.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 710f835..c3e107f 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1168,7 +1168,11 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
{
GtkPackDirection pack_dir = PACK_DIRECTION (menu_shell);
- gtk_menu_shell_deselect (menu_shell);
+ if (menu_shell->active_menu_item)
+ {
+ gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
+ menu_shell->active_menu_item = NULL;
+ }
if (!_gtk_menu_item_is_selectable (menu_item))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]