aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-28 06:52:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-28 06:52:26 +0000
commit4796fee4e6d23ef6d078092a1384c7bf32660c0f (patch)
tree9eb48cba682556bd14ebb0864914472177f27d75 /src
parentb804ae07f57e028f68e1938f3381a8c9d265a90e (diff)
src/account_dialog.c: account_open(): removed alloca() call.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2915 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/account_dialog.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/account_dialog.c b/src/account_dialog.c
index 49272336..22d2fb50 100644
--- a/src/account_dialog.c
+++ b/src/account_dialog.c
@@ -202,13 +202,12 @@ void account_add(void)
void account_open(PrefsAccount *ac_prefs)
{
gboolean prev_default;
- gchar *ac_name;
+ gchar *prev_name;
g_return_if_fail(ac_prefs != NULL);
prev_default = ac_prefs->is_default;
- Xstrdup_a(ac_name, ac_prefs->account_name ? ac_prefs->account_name : "",
- return);
+ prev_name = g_strdup(ac_prefs->account_name ? ac_prefs->account_name : "");
prefs_account_open(ac_prefs);
if (edit_account.window && GTK_WIDGET_VISIBLE(edit_account.window))
@@ -219,13 +218,16 @@ void account_open(PrefsAccount *ac_prefs)
if (!prev_default && ac_prefs->is_default)
account_set_as_default(ac_prefs);
- if (ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
+ if (ac_prefs->folder &&
+ strcmp2(prev_name, ac_prefs->account_name) != 0) {
folder_set_name(FOLDER(ac_prefs->folder),
ac_prefs->account_name);
folderview_set_all();
folder_write_list();
}
+ g_free(prev_name);
+
account_write_config_all();
account_set_menu();
main_window_reflect_prefs_all();