Performance enhancements. Remove the model from the combo box before

clearing and repopulating it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12280 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-01-07 06:00:05 +00:00
parent eb97fef444
commit fdbff57186
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-01-07 David Hampton <hampton@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@employees.org>
* src/import-export/hbci/dialog-hbcitrans.[ch]:

View File

@ -461,6 +461,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
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 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
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 );
}