[Goodies-commits] r2477 - xfce4-volstatus-icon/trunk/xfce4-volstatus-icon

Brian Tarricone kelnos at xfce.org
Fri Feb 2 02:46:42 CET 2007


Author: kelnos
Date: 2007-02-02 01:46:42 +0000 (Fri, 02 Feb 2007)
New Revision: 2477

Modified:
   xfce4-volstatus-icon/trunk/xfce4-volstatus-icon/xfce-volstatus-dialog.c
Log:
fix list store leak, fix volume leaks


Modified: xfce4-volstatus-icon/trunk/xfce4-volstatus-icon/xfce-volstatus-dialog.c
===================================================================
--- xfce4-volstatus-icon/trunk/xfce4-volstatus-icon/xfce-volstatus-dialog.c	2007-02-02 01:36:44 UTC (rev 2476)
+++ xfce4-volstatus-icon/trunk/xfce4-volstatus-icon/xfce-volstatus-dialog.c	2007-02-02 01:46:42 UTC (rev 2477)
@@ -193,8 +193,10 @@
                            -1);
         if(a_volume == volume) {
             gtk_list_store_remove(dialog->ls, &iter);
+            g_object_unref(G_OBJECT(volume));
             break;
         }
+        g_object_unref(G_OBJECT(volume));
     } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(dialog->ls), &iter));
 }
 
@@ -218,6 +220,7 @@
         return;
     
     xfce_volstatus_remove_volume(volume);
+    g_object_unref(G_OBJECT(volume));
 }
 
 static void
@@ -254,6 +257,8 @@
             gtk_label_set_text(GTK_LABEL(dialog->mntpt_lbl), "");
         
         gtk_widget_set_sensitive(dialog->remove_btn, TRUE);
+        
+        g_object_unref(G_OBJECT(volume));
     }
 }
 
@@ -286,6 +291,7 @@
     ls = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING,
                             THUNAR_VFS_TYPE_VOLUME);
     treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(ls));
+    g_object_unref(G_OBJECT(ls));
     gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
     gtk_widget_show(treeview);
     gtk_container_add(GTK_CONTAINER(sw), treeview);




More information about the Goodies-commits mailing list