r14592 - gnucash/trunk - Unref all new stores.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Aug 5 05:18:39 EDT 2006


Author: andi5
Date: 2006-08-05 05:18:26 -0400 (Sat, 05 Aug 2006)
New Revision: 14592
Trac: http://svn.gnucash.org/trac/changeset/14592

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/business/business-gnome/dialog-billterms.c
   gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c
   gnucash/trunk/src/gnome-search/dialog-search.c
   gnucash/trunk/src/gnome-search/search-core-utils.c
   gnucash/trunk/src/gnome-utils/dialog-commodity.c
   gnucash/trunk/src/gnome-utils/dialog-options.c
   gnucash/trunk/src/gnome-utils/gnc-account-sel.c
   gnucash/trunk/src/gnome-utils/gnc-druid-provider-multifile-gnome.c
   gnucash/trunk/src/gnome/dialog-tax-info.c
   gnucash/trunk/src/gnome/druid-loan.c
   gnucash/trunk/src/gnome/druid-stock-split.c
   gnucash/trunk/src/gnome/gnc-plugin-budget.c
   gnucash/trunk/src/gnome/lot-viewer.c
   gnucash/trunk/src/import-export/gnc-import-format-gnome.c
   gnucash/trunk/src/import-export/hbci/dialog-hbcitrans.c
   gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
   gnucash/trunk/src/import-export/import-main-matcher.c
   gnucash/trunk/src/import-export/import-match-picker.c
   gnucash/trunk/src/import-export/qif-import/dialog-account-picker.c
   gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
   gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
   gnucash/trunk/src/report/report-gnome/dialog-column-view.c
   gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
Log:
Unref all new stores.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/ChangeLog	2006-08-05 09:18:26 UTC (rev 14592)
@@ -1,5 +1,7 @@
 2006-08-05  Andreas Köhler  <andi5.py at gmx.net>
 
+	* various: Unref all new stores.
+
 	* src/gnome-utils/dialog-account.c: Check for account type
 	  compatibility when creating a new account. Fixes 344966.
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-billterms.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-billterms.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/business/business-gnome/dialog-billterms.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -705,6 +705,7 @@
   view = GTK_TREE_VIEW(btw->terms_view);
   store = gtk_list_store_new (NUM_BILL_TERM_COLS, G_TYPE_STRING, G_TYPE_POINTER);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes("", renderer,

Modified: gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -686,6 +686,7 @@
   store = gtk_list_store_new (NUM_TAX_TABLE_COLS, G_TYPE_STRING,
 			      G_TYPE_POINTER);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes("", renderer,
@@ -703,6 +704,7 @@
   store = gtk_list_store_new (NUM_TAX_ENTRY_COLS, G_TYPE_STRING,
 			      G_TYPE_POINTER, G_TYPE_STRING);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes("", renderer,

Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -227,6 +227,7 @@
 
   view = GTK_TREE_VIEW(ti_dialog->txf_category_view);
   store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
+  g_object_ref(store);
   gtk_tree_view_set_model(view, NULL);
 
   gtk_list_store_clear(store);
@@ -244,6 +245,7 @@
   }
 
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 }
 
 static void
@@ -706,6 +708,7 @@
     tree_view = GTK_TREE_VIEW(glade_xml_get_widget(xml, "txf_category_view"));
     store =  gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING);
     gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(store));
+    g_object_unref(store);
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes
       (_("Form"), renderer, "text", 0, NULL);

Modified: gnucash/trunk/src/gnome/druid-loan.c
===================================================================
--- gnucash/trunk/src/gnome/druid-loan.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome/druid-loan.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -1774,6 +1774,7 @@
 
         ldd->revView = GTK_TREE_VIEW(
 		gtk_tree_view_new_with_model( GTK_TREE_MODEL(store) ));
+	g_object_unref(store);
 
 	renderer = gtk_cell_renderer_text_new();
 	column = gtk_tree_view_column_new_with_attributes(_("Date"), renderer,

Modified: gnucash/trunk/src/gnome/druid-stock-split.c
===================================================================
--- gnucash/trunk/src/gnome/druid-stock-split.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome/druid-stock-split.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -603,6 +603,7 @@
     store = gtk_list_store_new(NUM_SPLIT_COLS, G_TYPE_POINTER, G_TYPE_STRING,
 			       G_TYPE_STRING, G_TYPE_STRING);
     gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+    g_object_unref(store);
 
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes(_("Account"), renderer,

Modified: gnucash/trunk/src/gnome/gnc-plugin-budget.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-budget.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome/gnc-plugin-budget.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -225,6 +225,7 @@
     gtk_tree_selection_set_mode(sel, GTK_SELECTION_BROWSE);
     tm = gnc_tree_model_budget_new(book);
     gnc_tree_view_budget_set_model(tv, tm);
+    g_object_unref(tm);
     gtk_container_add(GTK_CONTAINER(dlg->vbox), GTK_WIDGET(tv));
     gtk_widget_show_all(GTK_WIDGET(dlg));
 

Modified: gnucash/trunk/src/gnome/lot-viewer.c
===================================================================
--- gnucash/trunk/src/gnome/lot-viewer.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome/lot-viewer.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -602,6 +602,7 @@
 			     G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 			     G_TYPE_POINTER);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
   lv->lot_store = store;
 
   /* Set up the columns */

Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-search/dialog-search.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -646,6 +646,7 @@
 
   store = gtk_list_store_new(NUM_SEARCH_COLS, G_TYPE_STRING, G_TYPE_POINTER);
   combo_box = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   cell = gtk_cell_renderer_text_new ();
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combo_box), cell, TRUE);

Modified: gnucash/trunk/src/gnome-search/search-core-utils.c
===================================================================
--- gnucash/trunk/src/gnome-search/search-core-utils.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-search/search-core-utils.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -58,6 +58,7 @@
 
   store = gtk_list_store_new(NUM_GNC_COMBO_SEARCH_COLS, G_TYPE_STRING, G_TYPE_UINT);
   combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new ();
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);

Modified: gnucash/trunk/src/gnome-utils/dialog-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-commodity.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-utils/dialog-commodity.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -773,6 +773,7 @@
   }
 
   combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
+  g_object_unref(store);
   renderer = gtk_cell_renderer_text_new();
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);
   gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo), renderer,

Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -966,6 +966,7 @@
 
   store = gtk_list_store_new(1, G_TYPE_STRING);
   view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)));
+  g_object_unref(store);
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes("", renderer,
 						    "text", 0,

Modified: gnucash/trunk/src/gnome-utils/gnc-account-sel.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-account-sel.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-utils/gnc-account-sel.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -146,6 +146,7 @@
         gas->combo = GTK_COMBO_BOX_ENTRY(widget);
 	gtk_combo_box_set_model(GTK_COMBO_BOX(widget),
 				GTK_TREE_MODEL(gas->store));
+	g_object_unref(gas->store);
         gtk_container_add( GTK_CONTAINER(gas), widget );
 
         /* Add completion. */

Modified: gnucash/trunk/src/gnome-utils/gnc-druid-provider-multifile-gnome.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-druid-provider-multifile-gnome.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/gnome-utils/gnc-druid-provider-multifile-gnome.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -265,6 +265,7 @@
   /* Set up the file view */
   store = gtk_list_store_new (NUM_FILE_COLS, G_TYPE_STRING, G_TYPE_POINTER);
   gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes("", renderer,

Modified: gnucash/trunk/src/import-export/gnc-import-format-gnome.c
===================================================================
--- gnucash/trunk/src/import-export/gnc-import-format-gnome.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/gnc-import-format-gnome.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -95,6 +95,7 @@
 
   store = gtk_list_store_new(NUM_IFG_COLS, G_TYPE_STRING, G_TYPE_INT);
   gtk_combo_box_set_model(combo, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);

Modified: gnucash/trunk/src/import-export/hbci/dialog-hbcitrans.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/dialog-hbcitrans.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/hbci/dialog-hbcitrans.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -413,6 +413,7 @@
 						 G_TYPE_POINTER);
     gtk_tree_view_set_model(td->template_gtktreeview,
 			    GTK_TREE_MODEL(td->template_list_store));
+    g_object_unref(td->template_list_store);
     g_list_foreach(templates, fill_template_list_func, td->template_list_store);
 
     renderer = gtk_cell_renderer_text_new();

Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -664,6 +664,7 @@
 					    G_TYPE_POINTER, G_TYPE_STRING,
 					    G_TYPE_BOOLEAN);
     gtk_tree_view_set_model(info->accountview, GTK_TREE_MODEL(info->accountstore));
+    g_object_unref(info->accountstore);
 
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes(_("HBCI account name"),

Modified: gnucash/trunk/src/import-export/import-main-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-main-matcher.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/import-main-matcher.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -412,6 +412,7 @@
 			     G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING,
 			     GDK_TYPE_PIXBUF, G_TYPE_POINTER, G_TYPE_STRING);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   /* Add the columns */
   add_text_column(view, _("Date"), DOWNLOADED_COL_DATE);

Modified: gnucash/trunk/src/import-export/import-match-picker.c
===================================================================
--- gnucash/trunk/src/import-export/import-match-picker.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/import-match-picker.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -316,6 +316,7 @@
 			     G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 			     G_TYPE_POINTER);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   add_column(view, _("Account"),     DOWNLOADED_COL_ACCOUNT);
   add_column(view, _("Date"),        DOWNLOADED_COL_DATE);
@@ -344,6 +345,7 @@
 			     G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 			     G_TYPE_POINTER);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_pixbuf_new();
   g_object_set(renderer, "xalign", 0.0, NULL);

Modified: gnucash/trunk/src/import-export/qif-import/dialog-account-picker.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/dialog-account-picker.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/qif-import/dialog-account-picker.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -272,6 +272,7 @@
     store = gtk_tree_store_new(NUM_ACCOUNT_COLS, G_TYPE_STRING, G_TYPE_STRING,
 			       G_TYPE_BOOLEAN);
     gtk_tree_view_set_model(wind->treeview, GTK_TREE_MODEL(store));
+    g_object_unref(store);
 
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes(_("Account"), renderer,

Modified: gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/druid-qif-import.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/import-export/qif-import/druid-qif-import.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -1029,6 +1029,7 @@
   store = gtk_list_store_new(NUM_ACCOUNT_COLS, G_TYPE_INT, G_TYPE_STRING,
 			     G_TYPE_STRING, G_TYPE_BOOLEAN);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes(col_name, renderer,
@@ -2097,6 +2098,7 @@
   view = GTK_TREE_VIEW(retval->selected_file_view);
   store = gtk_list_store_new(NUM_FILENAME_COLS, G_TYPE_INT, G_TYPE_STRING);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes(_("Account"), renderer,
@@ -2124,6 +2126,7 @@
   store = gtk_list_store_new(NUM_QIF_TRANS_COLS, G_TYPE_INT, G_TYPE_STRING,
 			     G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes(_("Date"), renderer,
@@ -2155,6 +2158,7 @@
   store = gtk_list_store_new(NUM_QIF_TRANS_COLS, G_TYPE_INT, G_TYPE_STRING,
 			     G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
   gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+  g_object_unref(store);
 
   renderer = gtk_cell_renderer_text_new();
   column = gtk_tree_view_column_new_with_attributes(_("Date"), renderer,

Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-list.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-list.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -460,7 +460,10 @@
 
 	if (NULL == list_store)
 		list_store = gtk_list_store_new (1, G_TYPE_STRING);
+	else
+		g_object_ref(list_store);
 	tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
+	g_object_unref(list_store);
 	/* Removed code to enable sorting. Enable it after the list is
 	 * fully populated by calling gnc_item_list_finished_loading(). */
  

Modified: gnucash/trunk/src/report/report-gnome/dialog-column-view.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-column-view.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/report/report-gnome/dialog-column-view.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -338,6 +338,7 @@
     /* Build the 'available' view */
     store = gtk_list_store_new (NUM_AVAILABLE_COLS, G_TYPE_STRING, G_TYPE_INT);
     gtk_tree_view_set_model(r->available, GTK_TREE_MODEL(store));
+    g_object_unref(store);
 
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes("", renderer,
@@ -353,6 +354,7 @@
     store = gtk_list_store_new (NUM_CONTENTS_COLS, G_TYPE_STRING, G_TYPE_INT,
 				G_TYPE_INT, G_TYPE_INT);
     gtk_tree_view_set_model(r->contents, GTK_TREE_MODEL(store));
+    g_object_unref(store);
 
     renderer = gtk_cell_renderer_text_new();
     column = gtk_tree_view_column_new_with_attributes(_("Report"), renderer,

Modified: gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c	2006-08-05 01:17:28 UTC (rev 14591)
+++ gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c	2006-08-05 09:18:26 UTC (rev 14592)
@@ -365,6 +365,7 @@
   ss->list_view  = GTK_TREE_VIEW(glade_xml_get_widget (xml, "style_sheet_list_view"));
   ss->list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER);
   gtk_tree_view_set_model(ss->list_view, GTK_TREE_MODEL(ss->list_store));
+  g_object_unref(ss->list_store);
   renderer = gtk_cell_renderer_text_new ();
   gtk_tree_view_insert_column_with_attributes(ss->list_view, -1,
 					      _("Style Sheet Name"), renderer,



More information about the gnucash-changes mailing list