From bc1970bf71533a5b5c8660ba9ab3d23c39a614d2 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Mon, 28 Oct 2013 09:22:38 +0000 Subject: [PATCH] Use the symbol in iso-4217-currencies by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: Frédéric Perrin git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23345 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gnc-ui-util.c | 10 +++------- src/engine/iso-currencies-to-c | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/app-utils/gnc-ui-util.c b/src/app-utils/gnc-ui-util.c index 927a2991a9..3dd2b175cc 100644 --- a/src/app-utils/gnc-ui-util.c +++ b/src/app-utils/gnc-ui-util.c @@ -1754,14 +1754,10 @@ gnc_commodity_get_nice_symbol(const gnc_commodity *cm) if (!cm) return NULL; nice_symbol = gnc_commodity_get_user_symbol(cm); - if (nice_symbol) - return nice_symbol; - else if (gnc_commodity_equiv (cm, gnc_locale_default_currency_nodefault ())) - return gnc_localeconv()->currency_symbol; - else if ((nice_symbol = gnc_commodity_get_mnemonic(cm))) - return nice_symbol; + if (nice_symbol && *nice_symbol) + return nice_symbol; else - return ""; + return gnc_commodity_get_mnemonic(cm); } /********************************************************************\ diff --git a/src/engine/iso-currencies-to-c b/src/engine/iso-currencies-to-c index a2122b5730..1c22154809 100755 --- a/src/engine/iso-currencies-to-c +++ b/src/engine/iso-currencies-to-c @@ -54,12 +54,14 @@ exec guile -s $0 "$@" PWARN(\"failed to insert %s into commodity table\", fullname); } } + gnc_commodity_set_user_symbol(c, ~S); }\n" fullname namespace mnemonic exchange-code - smallest-fraction) + smallest-fraction + local-symbol) ;; Sorry, code doubling of the error message, but whatever. (begin