[maemo-commits] [maemo-commits] r12960 - in projects/haf/trunk/hildon-desktop: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jul 31 16:58:26 EEST 2007
Author: lucasr
Date: 2007-07-31 16:58:24 +0300 (Tue, 31 Jul 2007)
New Revision: 12960

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
Log:
2007-07-31  Lucas Rocha  <lucas.rocha at nokia.com>

	* src/hd-applications-menu.c
	(hd_applications_menu_categories_motion_notify): only activate item
	when the selected menu item has changed.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-31 13:49:50 UTC (rev 12959)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-31 13:58:24 UTC (rev 12960)
@@ -1,6 +1,12 @@
 2007-07-31  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hd-applications-menu.c
+	(hd_applications_menu_categories_motion_notify): only activate item
+	when the selected menu item has changed.
+
+2007-07-31  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-applications-menu.c
 	(hd_applications_menu_categories_motion_notify): make the motion
 	notify handler lighter so that it doesn't bring performance problems.
 	* libhildondesktop/hildon-desktop-popup-menu.c

Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-07-31 13:49:50 UTC (rev 12959)
+++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-07-31 13:58:24 UTC (rev 12960)
@@ -814,13 +814,19 @@
 					       GdkEventMotion *event,
 					       HDApplicationsMenu *button)
 {
-  GtkMenuItem *selected = 
+  static GtkMenuItem *selected_item = NULL;
+
+  GtkMenuItem *menu_item = 
     hildon_desktop_popup_menu_get_selected_item (HILDON_DESKTOP_POPUP_MENU (widget));
 
-  button->priv->focus_applications = TRUE;
+  if (menu_item != selected_item)
+  {
+    selected_item = menu_item;
 
-  gtk_menu_item_activate (selected);
-
+    button->priv->focus_applications = TRUE;
+    gtk_menu_item_activate (selected_item);
+  }
+  
   return TRUE;
 }
 


More information about the maemo-commits mailing list