gnucash maint: Bug 797569 - Swedish account templates not accessible
Geert Janssens
gjanssens at code.gnucash.org
Wed Jan 15 10:23:53 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/e91e84e7 (commit)
from https://github.com/Gnucash/gnucash/commit/8618c25d (commit)
commit e91e84e7edcc284df6a06d9ad9a239d48058a55f
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Jan 15 16:23:34 2020 +0100
Bug 797569 - Swedish account templates not accessible
Turned out to be a bug introduced by our port to cmake.
The Windows special casing for Swedish account hierarchies
was never called at all.
This fix includes a fix for a const correctness compiler warning as well.
diff --git a/gnucash/gnome/assistant-hierarchy.c b/gnucash/gnome/assistant-hierarchy.c
index 72c6e7455..9f8bf5443 100644
--- a/gnucash/gnome/assistant-hierarchy.c
+++ b/gnucash/gnome/assistant-hierarchy.c
@@ -235,19 +235,20 @@ gnc_get_ea_locale_dir(const char *top_dir)
GStatBuf buf;
int i;
-#ifdef PLATFORM_WIN32
+#if PLATFORM(WINDOWS)
/* On win32, setlocale() doesn't say anything useful, so we check
* g_win32_getlocale(). Unfortunately it checks the value of $LANG first,
* and the user might have worked around the absence of sv in gettext's
* Microsoft Conversion Array by setting it to "Swedish_Sweden", so first
* check that.
*/
- locale = g_getenv("LANG");
- if (g_strcmp0(locale, "Swedish_Sweden") == 0)
+ const gchar *env_locale;
+ env_locale = g_getenv("LANG");
+ if (g_strcmp0(env_locale, "Swedish_Sweden") == 0)
locale = g_strdup("sv_SE");
- else if (g_strcmp0(locale, "Swedish_Finland") == 0)
+ else if (g_strcmp0(env_locale, "Swedish_Finland") == 0)
locale =g_strdup("sv_FI");
- else if (g_strcmp0(locale, "Swedish_Ã
land Islands") == 0)
+ else if (g_strcmp0(env_locale, "Swedish_Ã
land Islands") == 0)
locale =g_strdup("sv_AX");
else
{
Summary of changes:
gnucash/gnome/assistant-hierarchy.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list