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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Nov 1 13:21:16 EET 2007
Author: lucasr
Date: 2007-11-01 13:21:13 +0200 (Thu, 01 Nov 2007)
New Revision: 14690

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

	* src/hd-applications-menu.c (hd_applications_menu_finalize,
	hd_applications_menu_init, hd_applications_menu_create_menu): use an
	idle call instead of timeout to first load menu structure on startup. 


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-10-31 15:36:33 UTC (rev 14689)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-11-01 11:21:13 UTC (rev 14690)
@@ -1,3 +1,9 @@
+2007-11-01  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-applications-menu.c (hd_applications_menu_finalize,
+	hd_applications_menu_init, hd_applications_menu_create_menu): use an
+	idle call instead of timeout to first load menu structure on startup. 
+
 2007-10-31  Johan Bilien  <johan.bilien at nokia.com>
 
 	* src/hd-home-window.c: if an image has a cache, that's the file

Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-10-31 15:36:33 UTC (rev 14689)
+++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-11-01 11:21:13 UTC (rev 14690)
@@ -105,7 +105,7 @@
   GnomeVFSMonitorHandle    *home_dir_monitor;
   GnomeVFSMonitorHandle    *desktop_dir_monitor;
   guint                     monitor_update_timeout;
-  guint                     menu_update_timeout;
+  guint                     menu_update_idle;
   gboolean                  focus_applications;
   gboolean                  motion_reset;
 
@@ -131,6 +131,9 @@
   if (button->priv->monitor_update_timeout)
     g_source_remove (button->priv->monitor_update_timeout);
   
+  if (button->priv->menu_update_idle)
+    g_source_remove (button->priv->menu_update_idle);
+  
   if (button->priv->system_dir_monitor)
     gnome_vfs_monitor_cancel (button->priv->system_dir_monitor);
   
@@ -222,8 +225,8 @@
 
   hd_applications_menu_register_monitors (button);
 
-  priv->menu_update_timeout =
-      g_timeout_add (5500, (GSourceFunc) hd_applications_menu_changed, button);
+  priv->menu_update_idle =
+      g_idle_add ((GSourceFunc) hd_applications_menu_changed, button);
 }
 
 GtkWidget *
@@ -907,10 +910,10 @@
   
   g_return_if_fail (button);
 
-  if (button->priv->menu_update_timeout > 0)
+  if (button->priv->menu_update_idle > 0)
   {
-    g_source_remove (button->priv->menu_update_timeout);
-    button->priv->menu_update_timeout = 0;
+    g_source_remove (button->priv->menu_update_idle);
+    button->priv->menu_update_idle = 0;
   }
 
   g_signal_handlers_block_by_func (button->priv->button,


More information about the maemo-commits mailing list