From 789d271164e306053cbd7fcd5503a0197a39b74f Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 12 Jun 2002 21:32:25 +0000 Subject: [PATCH] Check to see if the menu item is selectable before setting Wed Jun 12 17:31:15 2002 Owen Taylor * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): Check to see if the menu item is selectable before setting menu_shell->active_menu_item. This hopefully will keep gail from getting confused. (#84115, Remus Draica) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkmenushell.c | 3 +++ 7 files changed, 51 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3b7947b72d..92c2239dc9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Jun 12 17:31:15 2002 Owen Taylor + + * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item): + Check to see if the menu item is selectable before + setting menu_shell->active_menu_item. This hopefully + will keep gail from getting confused. + (#84115, Remus Draica) + Wed Jun 12 17:13:13 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 02da9df78a..91fee1c574 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -874,6 +874,9 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell, { gtk_menu_shell_deselect (menu_shell); + if (!_gtk_menu_item_is_selectable (menu_item)) + return; + menu_shell->active_menu_item = menu_item; _gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item), GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement);