[Xfce4-commits] r29914 - in thunar/branches/migration-to-gio: . thunar

Jannis Pohlmann jannis at xfce.org
Wed Apr 29 18:27:33 CEST 2009


Author: jannis
Date: 2009-04-29 16:24:19 +0000 (Wed, 29 Apr 2009)
New Revision: 29914

Modified:
   thunar/branches/migration-to-gio/ChangeLog
   thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c
Log:
	* thunar/thunar-shortcuts-model.c: In thunar_shortcuts_model_init()
	  don't increase the reference counter on the volumes, otherwise we'd
	  leak them here.

Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog	2009-04-29 07:42:23 UTC (rev 29913)
+++ thunar/branches/migration-to-gio/ChangeLog	2009-04-29 16:24:19 UTC (rev 29914)
@@ -1,5 +1,11 @@
 2009-04-29	Jannis Pohlmann <jannis at xfce.org>
 
+	* thunar/thunar-shortcuts-model.c: In thunar_shortcuts_model_init()
+	  don't increase the reference counter on the volumes, otherwise we'd
+	  leak them here.
+
+2009-04-29	Jannis Pohlmann <jannis at xfce.org>
+
 	* thunar/thunar-gio-extensions.{c,h}: Add new function
 	  g_volume_is_present() which checks whether the GDrive of a volume
 	  has media or not.

Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c	2009-04-29 07:42:23 UTC (rev 29913)
+++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c	2009-04-29 16:24:19 UTC (rev 29914)
@@ -366,7 +366,7 @@
            */
           shortcut = _thunar_slice_new0 (ThunarShortcut);
           shortcut->type = THUNAR_SHORTCUT_REMOVABLE_MEDIA;
-          shortcut->volume = g_object_ref (volume);
+          shortcut->volume = volume;
 
           /* link the shortcut to the list */
           thunar_shortcuts_model_add_shortcut (model, shortcut, path);
@@ -376,10 +376,10 @@
         {
           /* schedule the volume for later checking, not removable or 
            * there's no medium present */
-          model->hidden_volumes = g_list_prepend (model->hidden_volumes, 
-                                                  g_object_ref (volume));
+          model->hidden_volumes = g_list_prepend (model->hidden_volumes, volume);
         }
     }
+  g_list_free (volumes);
 
   /* prepend the row separator */
   shortcut = _thunar_slice_new0 (ThunarShortcut);




More information about the Xfce4-commits mailing list