aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-09-28 07:51:15 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-09-28 07:51:15 +0000
commitadfefc4f9cbf9fab5fe8a3eddcc42125f8f6dc5f (patch)
treeab238b6ec9d4ad4a49e7d4b3a3b8276e5ca56fed /src/main.c
parent061f08fca1cdd1dfe93a3973dfb6e28c55a215c5 (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.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index a1bf21a3..d4410300 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();