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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Jul 27 10:09:33 EEST 2007
Author: lucasr
Date: 2007-07-27 10:09:30 +0300 (Fri, 27 Jul 2007)
New Revision: 12863

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

	* src/hd-plugin-manager.c (hd_plugin_manager_sync): fixed object
	references leaks on plugins when syncing. Fixes NB#62321  


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-26 18:55:49 UTC (rev 12862)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-27 07:09:30 UTC (rev 12863)
@@ -1,3 +1,8 @@
+2007-07-26  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-plugin-manager.c (hd_plugin_manager_sync): fixed object
+	references leaks on plugins when syncing. Fixes NB#62321  
+
 2007-07-26  Johan Bilien  <johan.bilien at nokia.com>
 
 	* hildon-desktop-background.[ch]:

Modified: projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c	2007-07-26 18:55:49 UTC (rev 12862)
+++ projects/haf/trunk/hildon-desktop/src/hd-plugin-manager.c	2007-07-27 07:09:30 UTC (rev 12863)
@@ -269,9 +269,10 @@
   for (iter = children; keep_order && iter; iter = g_list_next (iter))
   {
     g_object_ref (iter->data);
+
     if (HILDON_DESKTOP_IS_CONTAINER (container))
       hildon_desktop_container_remove (HILDON_DESKTOP_CONTAINER (container), GTK_WIDGET (iter->data));	    
-    else	     
+    else
       gtk_container_remove (container, GTK_WIDGET (iter->data));
   }
 
@@ -290,7 +291,9 @@
         {
 	  gtk_widget_show (GTK_WIDGET (found->data));
           gtk_container_add (container, GTK_WIDGET (found->data));
+          g_object_unref (found->data);
 	}
+
         children = g_list_remove_link (children, found);
       }
       else if (policy != NULL)
@@ -315,6 +318,7 @@
   for (iter = children; iter; iter = g_list_next (iter))
   {
     gtk_widget_destroy (GTK_WIDGET (iter->data));
+    g_object_unref (iter->data);
   }
 
   g_list_foreach (f_plugin_list, (GFunc) g_free, NULL);


More information about the maemo-commits mailing list