[Gnucash-changes] r12280 - gnucash/trunk - Performance enhancements. Remove the model from the combo box before

David Hampton hampton at cvs.gnucash.org
Sat Jan 7 01:00:06 EST 2006


Author: hampton
Date: 2006-01-07 01:00:05 -0500 (Sat, 07 Jan 2006)
New Revision: 12280
Trac: http://svn.gnucash.org/trac/changeset/12280

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome/window-main-summarybar.c
Log:
Performance enhancements.  Remove the model from the combo box before
clearing and repopulating it.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-01-06 22:55:02 UTC (rev 12279)
+++ gnucash/trunk/ChangeLog	2006-01-07 06:00:05 UTC (rev 12280)
@@ -1,3 +1,9 @@
+2006-01-07  David Hampton  <hampton at employees.org>
+
+	* src/gnome/window-main-summarybar.c: Performance enhancements.
+	Remove the model from the combo box before clearing and
+	repopulating it.
+
 2006-01-06  David Hampton  <hampton at employees.org>
 
 	* src/import-export/hbci/dialog-hbcitrans.[ch]: 

Modified: gnucash/trunk/src/gnome/window-main-summarybar.c
===================================================================
--- gnucash/trunk/src/gnome/window-main-summarybar.c	2006-01-06 22:55:02 UTC (rev 12279)
+++ gnucash/trunk/src/gnome/window-main-summarybar.c	2006-01-07 06:00:05 UTC (rev 12280)
@@ -461,6 +461,7 @@
 
     lc = gnc_localeconv();
 
+    gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo), NULL);
     gtk_list_store_clear(summary->datamodel);
     for (current = g_list_first(currency_list); current; current = g_list_next(current)) {
       const char *mnemonic;
@@ -494,6 +495,8 @@
                          COLUMN_PROFITS_VALUE, profit_amount_string,
                          -1);
     }
+    gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo),
+			    GTK_TREE_MODEL(summary->datamodel));
 
     gtk_combo_box_set_active( GTK_COMBO_BOX(summary->totals_combo), 0 );
   }



More information about the gnucash-changes mailing list