Fix bug in status bar refresh.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3077 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-10-24 01:58:34 +00:00
parent 1cb23bfd36
commit 933025a0db

View File

@ -200,14 +200,15 @@ gnc_ui_get_currency_accumulator(GList **list, const gnc_commodity * currency)
{ {
GList *current; GList *current;
GNCCurrencyAcc *found; GNCCurrencyAcc *found;
for (current = g_list_first(*list); current; for (current = g_list_first(*list); current;
current = g_list_next(current)) { current = g_list_next(current)) {
found = current->data; found = current->data;
if (gnc_commodity_equiv(currency, found->currency)) { if (gnc_commodity_equiv(currency, found->currency)) {
return found; return found;
} }
} }
found = g_new0(GNCCurrencyAcc, 1); found = g_new0(GNCCurrencyAcc, 1);
found->currency = currency; found->currency = currency;
found->assets = 0.0; found->assets = 0.0;
@ -226,7 +227,8 @@ gnc_ui_get_currency_accumulator(GList **list, const gnc_commodity * currency)
* the item into the list. */ * the item into the list. */
static GNCCurrencyItem * static GNCCurrencyItem *
gnc_ui_get_currency_item(GList **list, const gnc_commodity * currency, GtkWidget *holder) gnc_ui_get_currency_item(GList **list, const gnc_commodity * currency,
GtkWidget *holder)
{ {
GList *current; GList *current;
GNCCurrencyItem *found; GNCCurrencyItem *found;
@ -363,8 +365,9 @@ gnc_ui_refresh_statusbar (void)
"Default Currency", "Default Currency",
"USD"); "USD");
default_currency = gnc_commodity_table_lookup(gnc_engine_commodities(), default_currency = gnc_commodity_table_lookup(gnc_engine_commodities(),
default_mnemonic, GNC_COMMODITY_NS_ISO,
GNC_COMMODITY_NS_ISO); default_mnemonic);
euro = gnc_lookup_boolean_option("International", euro = gnc_lookup_boolean_option("International",
"Enable EURO support", "Enable EURO support",
FALSE); FALSE);
@ -420,7 +423,7 @@ gnc_ui_refresh_statusbar (void)
while (current) while (current)
{ {
GList *next = current->next; GList *next = current->next;
currency_item = current->data; currency_item = current->data;
if (currency_item->touched == 0 if (currency_item->touched == 0
&& !gnc_commodity_equiv(currency_item->currency, && !gnc_commodity_equiv(currency_item->currency,
@ -432,7 +435,7 @@ gnc_ui_refresh_statusbar (void)
current->data = NULL; current->data = NULL;
g_list_free_1(current); g_list_free_1(current);
} }
current = next; current = next;
} }