diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-06-29 08:41:23 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-06-29 08:41:23 +0000 |
commit | b48c3acdce7def941bf6935bc844ac711c203df0 (patch) | |
tree | bca0f853630b0dc3967255bcdf253b5c7ebed1ba /src | |
parent | eb4ad7a7406af080c03c6af88430e8cd31e51225 (diff) |
check for filename encoding on the first run.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@384 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -212,6 +212,29 @@ int main(int argc, char *argv[]) /* migration from ~/.sylpheed to ~/.sylpheed-2.0 */ if (!is_dir_exist(RC_DIR)) { + const gchar *envstr; + AlertValue val; + + /* check for filename encoding */ + if (conv_get_locale_charset() != C_UTF_8) { + envstr = g_getenv("G_FILENAME_ENCODING"); + if (!envstr) + envstr = g_getenv("G_BROKEN_FILENAMES"); + if (!envstr) { + val = alertpanel(_("Filename encoding"), + _("The locale encoding is not UTF-8, but the environmental variable G_FILENAME_ENCODING is not set.\n" + "If the locale encoding is used for file name or directory name, it will not work correctly.\n" + "In that case, you must set the following environmental variable (see README for detail):\n" + "\n" + "\tG_FILENAME_ENCODING=@locale\n" + "\n" + "Continue?"), + GTK_STOCK_OK, GTK_STOCK_QUIT, + NULL); + if (G_ALERTDEFAULT != val) + return 1; + } + } if (make_dir(RC_DIR) < 0) return 1; if (is_dir_exist(OLD_RC_DIR)) |