diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-28 07:51:15 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-28 07:51:15 +0000 |
commit | adfefc4f9cbf9fab5fe8a3eddcc42125f8f6dc5f (patch) | |
tree | ab238b6ec9d4ad4a49e7d4b3a3b8276e5ca56fed /src/main.c | |
parent | 061f08fca1cdd1dfe93a3973dfb6e28c55a215c5 (diff) |
make the message catalog location absolute path if LOCALEDIR is relative.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@611 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -367,14 +367,25 @@ static gint get_queued_message_num(void) static void app_init(void) { + prog_version = PROG_VERSION; + startup_dir = g_get_current_dir(); + setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); + + if (g_path_is_absolute(LOCALEDIR)) + bindtextdomain(PACKAGE, LOCALEDIR); + else { + gchar *locale_dir; + + locale_dir = g_strconcat(startup_dir, G_DIR_SEPARATOR_S, + LOCALEDIR, NULL); + bindtextdomain(PACKAGE, locale_dir); + g_free(locale_dir); + } + bind_textdomain_codeset(PACKAGE, CS_UTF_8); textdomain(PACKAGE); - prog_version = PROG_VERSION; - startup_dir = g_get_current_dir(); - sock_init(); #if USE_SSL ssl_init(); |