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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 30 16:01:21 EEST 2007
Author: jobi
Date: 2007-08-30 16:01:17 +0300 (Thu, 30 Aug 2007)
New Revision: 13490

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
   projects/haf/trunk/hildon-desktop/src/hd-desktop.c
   projects/haf/trunk/hildon-desktop/src/hd-home-window.c
   projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c
Log:

2007-08-30 Johan Bilien  <johan.bilien at nokia.com>

	* src/hd-plugin-manager.c (hd_plugin_manager_sync):
	- do not unref the widgets after destroying them if the container
	does not require preserving the order. Fixes: NB#67049
	* src/hd-desktop.c:
	- add a flag to ignore monitoring of the container configuration
	after saving, so avoid an extra synching
	- include saving when selecting applets
	* src/hd-home-window.c:
	- let HDDesktop save the configuration when selecting applets



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-30 12:44:47 UTC (rev 13489)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-30 13:01:17 UTC (rev 13490)
@@ -1,3 +1,15 @@
+2007-08-30 Johan Bilien  <johan.bilien at nokia.com>
+
+	* src/hd-plugin-manager.c (hd_plugin_manager_sync):
+	- do not unref the widgets after destroying them if the container
+	does not require preserving the order. Fixes: NB#67049
+	* src/hd-desktop.c:
+	- add a flag to ignore monitoring of the container configuration
+	after saving, so avoid an extra synching
+	- include saving when selecting applets
+	* src/hd-home-window.c:
+	- let HDDesktop save the configuration when selecting applets
+
 2007-08-30  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hd-applications-menu.c (hd_applications_menu_get_items): set the

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-08-30 12:44:47 UTC (rev 13489)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-08-30 13:01:17 UTC (rev 13490)
@@ -575,7 +575,7 @@
   GList                *list_item;
 
   list_item = g_list_find_custom (priv->children_data,
-                                  child, 
+                                  child,
                                   (GCompareFunc)find_by_widget);
 
 
@@ -644,6 +644,8 @@
   HildonHomeArea       *area = HILDON_HOME_AREA (container);
   ChildData            *child_data;
 
+  g_return_if_fail (child->parent == GTK_WIDGET (container));
+
   child_data = hildon_home_area_get_child_data (area, child);
 
   g_return_if_fail (child_data);

Modified: projects/haf/trunk/hildon-desktop/src/hd-desktop.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-08-30 12:44:47 UTC (rev 13489)
+++ projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-08-30 13:01:17 UTC (rev 13490)
@@ -92,6 +92,7 @@
   gboolean                is_ordered;
   gboolean                load_new_plugins;
   GnomeVFSMonitorHandle  *plugin_dir_monitor;
+  gboolean                ignore_next_monitor;
 } HDDesktopContainerInfo;
 
 typedef struct
@@ -167,7 +168,6 @@
 hd_desktop_application_frozen (HDWM *hdwm, HDWMWindow *win, gpointer data)
 {
   GtkWidget *note;
-  g_debug ("application frozen");
 
   HDWMApplication *app = hd_wm_window_get_application (win);
 
@@ -179,7 +179,6 @@
 
   if (note && GTK_IS_WIDGET (note))
   {
-    g_debug ("hd_wm_ping_timeout: the note already exists.");
     goto cleanup_and_exit;
   }
 
@@ -558,13 +557,14 @@
 
   plugin_list = hd_desktop_plugin_list_from_container (window->container);
 
+  info->ignore_next_monitor = TRUE;
   hd_desktop_plugin_list_to_conf (plugin_list, info->config_file);
 
   g_list_foreach (plugin_list, (GFunc) g_free , NULL);
   g_list_free (plugin_list); 
 }
 
-static void 
+static void
 hd_desktop_select_plugins (HildonDesktopWindow *window, gpointer user_data)
 {
   HDDesktopPrivate *priv;
@@ -576,7 +576,7 @@
   g_return_if_fail (user_data != NULL);
 
   info = (HDDesktopContainerInfo *) user_data;
-  
+
   g_return_if_fail (HD_IS_DESKTOP (info->desktop));
 
   priv = info->desktop->priv;
@@ -597,6 +597,8 @@
                             window->container,
 			    info->policy,
 			    info->is_ordered);
+
+    hd_desktop_container_save (window, info);
   }
 
   g_list_foreach (selected_plugins, (GFunc) g_free , NULL);
@@ -669,6 +671,15 @@
     if (info != NULL)
     {
       gchar *config_file;
+
+      /* If the ignore_next_monitor flag is set, we ignore this event.
+       * The flag is set when the container configuration is saved */
+      if (info->ignore_next_monitor)
+      {
+        info->ignore_next_monitor = FALSE;
+        g_free (filename);
+        return;
+      }
       
       config_file = hd_desktop_get_conf_file_path (info->config_file);
       
@@ -724,6 +735,15 @@
     if (info != NULL)
     {
       gchar *config_file;
+
+      /* If the ignore_next_monitor flag is set, we ignore this event.
+       * The flag is set when the container configuration is saved */
+      if (info->ignore_next_monitor)
+      {
+        info->ignore_next_monitor = FALSE;
+        g_free (filename);
+        return;
+      }
       
       config_file = hd_desktop_get_conf_file_path (info->config_file);
       
@@ -1278,7 +1298,6 @@
     g_free (type);
     g_free (plugin_dir);
     g_free (container_config);
-    g_free (container_config_file);
     g_free (policy_module);
     g_list_foreach (plugin_list, (GFunc) g_free , NULL);
     g_list_free (plugin_list);

Modified: projects/haf/trunk/hildon-desktop/src/hd-home-window.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-home-window.c	2007-08-30 12:44:47 UTC (rev 13489)
+++ projects/haf/trunk/hildon-desktop/src/hd-home-window.c	2007-08-30 13:01:17 UTC (rev 13490)
@@ -1468,11 +1468,6 @@
   hildon_home_area_set_batch_add (HILDON_HOME_AREA (area), FALSE);
   priv->selecting_applets = FALSE;
 
-  if (HILDON_IS_HOME_AREA (area))
-    {
-      g_signal_emit_by_name (window, "save", NULL);
-    }
-
 }
 
 typedef struct

Modified: projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c	2007-08-30 12:44:47 UTC (rev 13489)
+++ projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c	2007-08-30 13:01:17 UTC (rev 13490)
@@ -318,7 +318,8 @@
   for (iter = children; iter; iter = g_list_next (iter))
   {
     gtk_widget_destroy (GTK_WIDGET (iter->data));
-    g_object_unref (iter->data);
+    if (keep_order)
+      g_object_unref (iter->data);
   }
 
   g_list_foreach (f_plugin_list, (GFunc) g_free, NULL);


More information about the maemo-commits mailing list