talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a3ee5bae26abfaf557ac0e1dbe798ed0e68dd956
parent 0158a5105c5c4eb3c0239be2fa2bcc0461c760aa
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Thu,  9 Jul 2015 12:38:50 +0200

Use g_win32_getlocale() in manual availability detection on Windows.

Diffstat:
Msrc/manual.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 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)