From: Andrej Kacian Date: Thu, 9 Jul 2015 10:38:50 +0000 (+0200) Subject: Use g_win32_getlocale() in manual availability detection on Windows. X-Git-Tag: 3.12.0~42 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=a3ee5bae26abfaf557ac0e1dbe798ed0e68dd956 Use g_win32_getlocale() in manual availability detection on Windows. --- diff --git a/src/manual.c b/src/manual.c index 94c26ac58..662072061 100644 --- a/src/manual.c +++ b/src/manual.c @@ -47,17 +47,13 @@ static gchar *get_language() gchar *c; #ifdef G_OS_WIN32 - language = g_strdup(gtk_set_locale()); + language = g_win32_getlocale(); #else - /* FIXME: Why not using gtk_set_locale here too? -wk */ language = g_strdup(setlocale(LC_MESSAGES, NULL)); #endif - /* At least under W32 it is possible that gtk_set_locate - returns NULL. This is not documented but well, it happens - and g_strdup is happy with a NULL argument. We return a - standard language string in this case. */ - if (!language) - return g_strdup("en"); + if (!language) + return g_strdup("en"); + if((c = strchr(language, ',')) != NULL) *c = '\0'; if((c = strchr(language, '_')) != NULL)