gnucash maint: Bug 797873 - New Account Hierarchy selects en_US
Robert Fewell
bobit at code.gnucash.org
Sat Jul 25 06:40:35 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/9d30eec8 (commit)
from https://github.com/Gnucash/gnucash/commit/8b3baadf (commit)
commit 9d30eec853772a27ee7a1dddc5dcd144dff94ade
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Sat Jul 25 11:35:11 2020 +0100
Bug 797873 - New Account Hierarchy selects en_US
In update_language_region_combos, the directory returned from
gnc_path_get_accountsdir is traversed looking for language/regions.
When it hits "C" directory it unconditionally overwrites the
start_region variable which is used to determine the default
language/region so commit compares this directory with the locale_dir
before setting. Patch provided by 'YOSHINO Yoshihito'
diff --git a/gnucash/gnome/assistant-hierarchy.c b/gnucash/gnome/assistant-hierarchy.c
index f1b861122..40160221d 100644
--- a/gnucash/gnome/assistant-hierarchy.c
+++ b/gnucash/gnome/assistant-hierarchy.c
@@ -532,8 +532,12 @@ update_language_region_combos (hierarchy_data *data, const gchar *locale_dir)
{
gtk_list_store_set (region_store, ®ion_iter, LANGUAGE_STRING, "en", REGION_STRING, "US", -1);
lang_name = g_strdup ("en");
- g_free (start_region);
- start_region = g_strdup (lang_name);
+
+ if (g_str_has_suffix (locale_dir, name))
+ {
+ g_free (start_region);
+ start_region = g_strdup (lang_name);
+ }
}
else
lang_name = g_strdup (parts[0]);
Summary of changes:
gnucash/gnome/assistant-hierarchy.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list