Commit f42be737 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Merge fix from maemo-gtk:

2007-05-25  Michael Natterer  <mitch@imendio.com>

	Merge fix from maemo-gtk:

	* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): open submenus
	also if the menu item we're entering is already selected. Also, it
	makes no sense to forward the event to the parent menu shell if we
	are entering a menu item of *this* menu shell.


svn path=/trunk/; revision=17911
parent d0150e7c
2007-05-25 Michael Natterer <mitch@imendio.com>
Merge fix from maemo-gtk:
* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): open submenus
also if the menu item we're entering is already selected. Also, it
makes no sense to forward the event to the parent menu shell if we
are entering a menu item of *this* menu shell.
2007-05-24 Matthias Clasen <mclasen@redhat.com> 2007-05-24 Matthias Clasen <mclasen@redhat.com>
* gtk/stock-icons/*: Make sure all svg icons are added * gtk/stock-icons/*: Make sure all svg icons are added
......
...@@ -789,18 +789,17 @@ gtk_menu_shell_enter_notify (GtkWidget *widget, ...@@ -789,18 +789,17 @@ gtk_menu_shell_enter_notify (GtkWidget *widget,
(GTK_IS_MENU_ITEM (menu_item) && (GTK_IS_MENU_ITEM (menu_item) &&
!_gtk_menu_item_is_selectable (menu_item))) !_gtk_menu_item_is_selectable (menu_item)))
return TRUE; return TRUE;
if ((menu_item->parent == widget) && if (menu_item->parent == widget &&
(menu_shell->active_menu_item != menu_item) &&
GTK_IS_MENU_ITEM (menu_item)) GTK_IS_MENU_ITEM (menu_item))
{ {
if (menu_shell->ignore_enter) if (menu_shell->ignore_enter)
return TRUE; return TRUE;
if ((event->detail != GDK_NOTIFY_INFERIOR) && if (event->detail != GDK_NOTIFY_INFERIOR)
(GTK_WIDGET_STATE (menu_item) != GTK_STATE_PRELIGHT)) {
{ if (GTK_WIDGET_STATE (menu_item) != GTK_STATE_PRELIGHT)
gtk_menu_shell_select_item (menu_shell, menu_item); gtk_menu_shell_select_item (menu_shell, menu_item);
/* If any mouse button is down, and there is a submenu /* If any mouse button is down, and there is a submenu
* that is not yet visible, activate it. It's sufficient * that is not yet visible, activate it. It's sufficient
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment