aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-09-29 02:21:29 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-09-29 02:21:29 +0000
commit5b6d2d38d28a9e5983f45d18db13bcceec8385c1 (patch)
tree2773c53af5eed53a125c617c5b24d5546e2552f6 /src/main.c
parent6dbb1c1eccf35f0de4692f1d91e6f07cd7e99db4 (diff)
check for HAVE_LOCALE_H and ENABLE_NLS.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2045 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 4052b5a2..becde2c5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -590,7 +590,9 @@ static void app_init(void)
g_unsetenv("LANGUAGE");
#endif
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, "");
+#endif
prog_version = PROG_VERSION;
set_startup_dir();
@@ -602,6 +604,7 @@ static void app_init(void)
g_free(newpath);
#endif
+#ifdef ENABLE_NLS
if (g_path_is_absolute(LOCALEDIR))
bindtextdomain(PACKAGE, LOCALEDIR);
else {
@@ -620,13 +623,14 @@ static void app_init(void)
locale_dir = locale_dir_;
}
}
-#endif
+#endif /* G_OS_WIN32 */
bindtextdomain(PACKAGE, locale_dir);
g_free(locale_dir);
}
bind_textdomain_codeset(PACKAGE, CS_UTF_8);
textdomain(PACKAGE);
+#endif /* ENABLE_NLS */
#ifdef G_OS_WIN32
read_ini_file();
@@ -823,9 +827,11 @@ static void check_gpg(void)
/* Also does some gpgme init */
gpgme_engine_info_t engineInfo;
+#if HAVE_LOCALE_H
gpgme_set_locale(NULL, LC_CTYPE, setlocale(LC_CTYPE, NULL));
gpgme_set_locale(NULL, LC_MESSAGES,
setlocale(LC_MESSAGES, NULL));
+#endif
if (!gpgme_get_engine_info(&engineInfo)) {
while (engineInfo) {