[maemo-commits] [maemo-commits] r14732 - in projects/haf/trunk/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Nov 7 14:15:22 EET 2007
Author: lucasr
Date: 2007-11-07 14:15:20 +0200 (Wed, 07 Nov 2007)
New Revision: 14732

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
Log:
2007-11-07  Lucas Rocha  <lucas.rocha at nokia.com>

	* libhildondesktop/hildon-desktop-popup-menu.c
	(hildon_desktop_popup_menu_press_event): do not take non-visible menu
	items into account when checking which item was selected on button
	press.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-11-07 11:54:48 UTC (rev 14731)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-11-07 12:15:20 UTC (rev 14732)
@@ -1,3 +1,10 @@
+2007-11-07  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* libhildondesktop/hildon-desktop-popup-menu.c
+	(hildon_desktop_popup_menu_press_event): do not take non-visible menu
+	items into account when checking which item was selected on button
+	press.
+
 2007-11-01  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hd-applications-menu.c (hd_applications_menu_finalize,

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-11-07 11:54:48 UTC (rev 14731)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-11-07 12:15:20 UTC (rev 14732)
@@ -708,7 +708,7 @@
 
   return TRUE;
 } 
-	
+
 static gboolean 
 hildon_desktop_popup_menu_press_event (GtkWidget      *widget,
                                        GdkEventButton *event)
@@ -722,6 +722,9 @@
 
   for (l = menu_items; l != NULL; l = g_list_next (l))
   {
+    if (!hildon_desktop_popup_menu_item_is_selectable (GTK_WIDGET (l->data)))
+      continue;
+
     gtk_widget_get_pointer (GTK_WIDGET (l->data), &x, &y);
 
     w = GTK_WIDGET (l->data)->allocation.width;
@@ -731,8 +734,7 @@
     {
       if (GTK_IS_MENU_ITEM (l->data))
       {
-        if (hildon_desktop_popup_menu_item_is_selectable (GTK_WIDGET (l->data)) &&
-            menu->priv->selected_item != GTK_MENU_ITEM (l->data))
+        if (menu->priv->selected_item != GTK_MENU_ITEM (l->data))
         {
           if (GTK_IS_ITEM (menu->priv->selected_item))
             gtk_item_deselect (GTK_ITEM (menu->priv->selected_item));


More information about the maemo-commits mailing list