aboutsummaryrefslogtreecommitdiff
path: root/src/account.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-18 10:50:43 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-18 10:50:43 +0000
commit295bd43a38d1b785183ba1599e78fa6fbbcd8e02 (patch)
tree1e872659029f80928f3f98b4352aae8888a6928d /src/account.c
parent3fec59fac205ff4588f8afe93b28943b31f9ab8d (diff)
implemented the migration of configuration.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@14 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/account.c')
-rw-r--r--src/account.c32
1 files changed, 4 insertions, 28 deletions
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);