talons

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

commit 0cd779963f10ef205534dfa415831fe1738c88c6
parent 1dc842b0c1a0256ae63237475ac3516fd17cbeca
Author: Colin Leroy <colin@colino.net>
Date:   Thu,  8 Nov 2012 09:13:37 +0000

2012-11-08 [colin]	3.8.1cvs115

	* src/plugins/pgpcore/sgpgme.c
		Fix Windows runtime crash

Diffstat:
MChangeLog | 5+++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/plugins/pgpcore/sgpgme.c | 16++++++++++++++++
4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2012-11-08 [colin] 3.8.1cvs115 + + * src/plugins/pgpcore/sgpgme.c + Fix Windows runtime crash + 2012-11-08 [colin] 3.8.1cvs114 * src/gtk/quicksearch.c diff --git a/PATCHSETS b/PATCHSETS @@ -4489,3 +4489,4 @@ ( cvs diff -u -r 1.1.2.11 -r 1.1.2.12 doc/man/claws-mail.1; cvs diff -u -r 1.1.2.117 -r 1.1.2.118 src/gtk/quicksearch.c; ) > 3.8.1cvs112.patchset ( cvs diff -u -r 1.28.2.54 -r 1.28.2.55 src/mbox.c; ) > 3.8.1cvs113.patchset ( cvs diff -u -r 1.1.2.118 -r 1.1.2.119 src/gtk/quicksearch.c; ) > 3.8.1cvs114.patchset +( cvs diff -u -r 1.1.2.74 -r 1.1.2.75 src/plugins/pgpcore/sgpgme.c; ) > 3.8.1cvs115.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=114 +EXTRA_VERSION=115 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c @@ -615,28 +615,44 @@ void sgpgme_init() gpgme_engine_info_t engineInfo; if (gpgme_check_version("1.0.0")) { #ifdef LC_CTYPE + debug_print("setting gpgme CTYPE locale\n"); +#ifdef G_OS_WIN32 + ctype_locale = g_win32_getlocale(); +#else ctype_locale = g_strdup(setlocale(LC_CTYPE, NULL)); +#endif + debug_print("setting gpgme locale to: %s\n", ctype_locale ? ctype_locale : "NULL"); if (strchr(ctype_locale, '.')) *(strchr(ctype_locale, '.')) = '\0'; else if (strchr(ctype_locale, '@')) *(strchr(ctype_locale, '@')) = '\0'; ctype_utf8_locale = g_strconcat(ctype_locale, ".UTF-8", NULL); + debug_print("setting gpgme locale to UTF8: %s\n", ctype_utf8_locale ? ctype_utf8_locale : "NULL"); gpgme_set_locale(NULL, LC_CTYPE, ctype_utf8_locale); + debug_print("done\n"); g_free(ctype_utf8_locale); g_free(ctype_locale); #endif #ifdef LC_MESSAGES + debug_print("setting gpgme MESSAGES locale\n"); +#ifdef G_OS_WIN32 + messages_locale = g_win32_getlocale(); +#else messages_locale = g_strdup(setlocale(LC_MESSAGES, NULL)); +#endif + debug_print("setting gpgme locale to: %s\n", messages_locale ? messages_locale : "NULL"); if (strchr(messages_locale, '.')) *(strchr(messages_locale, '.')) = '\0'; else if (strchr(messages_locale, '@')) *(strchr(messages_locale, '@')) = '\0'; messages_utf8_locale = g_strconcat(messages_locale, ".UTF-8", NULL); + debug_print("setting gpgme locale to UTF8: %s\n", messages_utf8_locale ? messages_utf8_locale : "NULL"); gpgme_set_locale(NULL, LC_MESSAGES, messages_utf8_locale); + debug_print("done\n"); g_free(messages_utf8_locale); g_free(messages_locale); #endif