[Gnucash-changes] Unref the sort_model so that the entire set of models will be properly

David Hampton hampton at cvs.gnucash.org
Thu Jun 9 16:35:58 EDT 2005


Log Message:
-----------
Unref the sort_model so that the entire set of models will
be properly deleted.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/gnome-utils:
        gnc-tree-view-account.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.221
retrieving revision 1.1487.2.222
diff -LChangeLog -LChangeLog -u -r1.1487.2.221 -r1.1487.2.222
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2005-06-09  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-tree-view-account.c: Unref the sort_model so
+	that the entire set of models will be properly deleted.
+
 2005-06-08  Derek Atkins  <derek at ihtfp.com>
 
 	* src/core-utils/gnc-hooks.[ch]: rename some functions, set up the
@@ -26,6 +31,8 @@
 
 2005-06-06  David Hampton  <hampton at employees.org>
 
+	* gnucash/src/backend/qsf/qsf-backend.c: Couple of bug fixes.
+	
 	* src/gnome/gnc-plugin-basic-commands.c: Forgot to change the
 	callback data provided to these commands now that they're provided
 	by a plugin.
Index: gnc-tree-view-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-view-account.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -Lsrc/gnome-utils/gnc-tree-view-account.c -Lsrc/gnome-utils/gnc-tree-view-account.c -u -r1.1.2.19 -r1.1.2.20
--- src/gnome-utils/gnc-tree-view-account.c
+++ src/gnome-utils/gnc-tree-view-account.c
@@ -106,7 +106,8 @@
 static void
 dump_view (GncTreeViewAccount *view, gpointer dummy)
 {
-    g_warning("GncTreeViewAccount %p still exists.", view);
+  g_warning("GncTreeViewAccount %p still exists (ref count %d).",
+	    view, G_OBJECT(view)->ref_count);
 }
 
 static gint
@@ -403,8 +404,9 @@
 
   /* Set up the view private sort layer on the common model. */
   s_model = gtk_tree_model_sort_new_with_model(f_model);
-  gnc_tree_view_set_model (view, s_model);
   g_object_unref(G_OBJECT(f_model));
+  gnc_tree_view_set_model (view, s_model);
+  g_object_unref(G_OBJECT(s_model));
 
   /* Set default visibilities */
   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(view), FALSE);


More information about the gnucash-changes mailing list