diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/mainwindow.c | 6 | ||||
-rw-r--r-- | src/setup.c | 4 |
4 files changed, 20 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2010-03-19 + + * src/main.c + src/setup.c + src/mainwindow.c: update account and folder config files after + creating new accounts. + 2010-03-16 * version 3.0.1 @@ -212,6 +212,7 @@ int main(int argc, char *argv[]) GList *iconlist = NULL; #endif GObject *syl_app; + PrefsAccount *new_account = NULL; app_init(); parse_cmd_opt(argc, argv); @@ -334,7 +335,7 @@ int main(int argc, char *argv[]) folder_write_list(); } if (!account_get_list()) { - setup_account(); + new_account = setup_account(); } account_set_menu(); @@ -343,6 +344,8 @@ int main(int argc, char *argv[]) account_set_missing_folder(); folder_set_missing_folders(); folderview_set(folderview); + if (new_account && new_account->folder) + folder_write_list(); addressbook_read_file(); diff --git a/src/mainwindow.c b/src/mainwindow.c index d488b187..c74dd928 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -3897,17 +3897,21 @@ static void prefs_account_open_cb(MainWindow *mainwin, guint action, static void new_account_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { + PrefsAccount *ac; + if (compose_get_compose_list()) { alertpanel_notice(_("Some composing windows are open.\n" "Please close all the composing windows before editing the accounts.")); return; } - if (setup_account()) { + if ((ac = setup_account())) { account_set_menu(); main_window_reflect_prefs_all(); account_set_missing_folder(); folderview_set(mainwin->folderview); + if (ac->folder) + folder_write_list(); } } diff --git a/src/setup.c b/src/setup.c index ac00b737..51df4378 100644 --- a/src/setup.c +++ b/src/setup.c @@ -1005,7 +1005,11 @@ PrefsAccount *setup_account(void) g_free(ac->sig_text); ac->sig_text = g_strdup_printf("%s <%s>\\n", ac->name, ac->address); + account_update_lock(); account_append(ac); + account_write_config_all(); + account_update_unlock(); + account_updated(); g_free(setupac.name); g_free(setupac.addr); |