From 295bd43a38d1b785183ba1599e78fa6fbbcd8e02 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 18 Jan 2005 10:50:43 +0000 Subject: implemented the migration of configuration. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@14 ee746299-78ed-0310-b773-934348b2243d --- src/account.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/account.c') diff --git a/src/account.c b/src/account.c index 8c9fe253..582b5d2d 100644 --- a/src/account.c +++ b/src/account.c @@ -44,7 +44,6 @@ #include "stock_pixmap.h" #include "statusbar.h" #include "inc.h" -#include "codeconv.h" #include "gtkutils.h" #include "utils.h" #include "alertpanel.h" @@ -115,23 +114,13 @@ void account_read_config_all(void) { GSList *ac_label_list = NULL, *cur; gchar *rcpath; - const gchar *encoding = NULL; FILE *fp; gchar buf[PREFSBUFSIZE]; PrefsAccount *ac_prefs; debug_print(_("Reading all config for each account...\n")); - rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, - NULL); - if (!is_file_exist(rcpath)) { - debug_print("reading older version of accountrc ...\n"); - g_free(rcpath); - rcpath = g_strconcat(get_old_rc_dir(), G_DIR_SEPARATOR_S, - ACCOUNT_RC, NULL); - encoding = conv_get_locale_charset_str(); - } - + rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, NULL); if ((fp = fopen(rcpath, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen"); g_free(rcpath); @@ -144,22 +133,9 @@ void account_read_config_all(void) strretchomp(buf); memmove(buf, buf + 1, strlen(buf)); buf[strlen(buf) - 1] = '\0'; - if (encoding) { - gchar *conv_str; - - conv_str = conv_codeset_strdup - (buf, encoding, - conv_get_internal_charset_str()); - if (!conv_str) - conv_str = g_strdup(buf); - debug_print("Found label: %s\n", conv_str); - ac_label_list = g_slist_append(ac_label_list, - conv_str); - } else { - debug_print("Found label: %s\n", buf); - ac_label_list = g_slist_append(ac_label_list, - g_strdup(buf)); - } + debug_print("Found label: %s\n", buf); + ac_label_list = g_slist_append(ac_label_list, + g_strdup(buf)); } } fclose(fp); -- cgit v1.2.3