diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-01-31 06:16:48 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-01-31 06:16:48 +0800 |
commit | 728677a50b2f8f0fd7e8d70f5502e6d36f679a2f (patch) | |
tree | 542e01f23c9a9eadf8ba1be93ac0873a2ccd00e3 /mail/mail-account-gui.c | |
parent | dc9814258153575748d18243304d7d594e673545 (diff) | |
download | gsoc2013-evolution-728677a50b2f8f0fd7e8d70f5502e6d36f679a2f.tar.gz gsoc2013-evolution-728677a50b2f8f0fd7e8d70f5502e6d36f679a2f.tar.zst gsoc2013-evolution-728677a50b2f8f0fd7e8d70f5502e6d36f679a2f.zip |
Fixes for bug #53348
2004-01-30 Jeffrey Stedfast <fejj@ximian.com>
Fixes for bug #53348
* mail-account-gui.c (mail_account_gui_save): Only add the new
store to the mail-component if the mail-component doesn't already
know about it (ie. only if we are adding a new account).
* em-folder-tree-model.c (em_folder_tree_model_add_store): Hash
our store-info based on account here.
(em_folder_tree_model_init): Listen for
account_changed/account_removed signals.
(em_folder_tree_model_finalize): Disconnect above handlers.
(account_changed): Tear down the account store node and replace it
with the new store (assuming it belongs in the tree after the
changes).
(account_removed): Remove the account store from the tree.
svn path=/trunk/; revision=24551
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r-- | mail/mail-account-gui.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index b24ac827d5..6e35041438 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -2046,15 +2046,6 @@ mail_account_gui_save (MailAccountGui *gui) if (!mail_config_find_account (account)) { /* this is a new account so add it to our account-list */ is_new = TRUE; - } else if (account->source->url) { - /* this means the account was edited - if the old and - new source urls are not identical, replace the old - store with the new store */ -#define sources_equal(old,new) (new->url && !strcmp (old->url, new->url)) - if (!sources_equal (account->source, new->source)) { - /* Remove the old store from the folder-tree */ - mail_component_remove_store_by_uri (mail_component_peek (), account->source->url); - } } /* update the old account with the new settings */ @@ -2063,17 +2054,17 @@ mail_account_gui_save (MailAccountGui *gui) if (is_new) { mail_config_add_account (account); + + /* if the account provider is something we can stick + in the folder-tree and not added by some other + component, then get the CamelStore and add it to + the folder-tree */ + if (is_storage && account->enabled) + mail_get_store (account->source->url, NULL, add_new_store, account); } else { e_account_list_change (mail_config_get_accounts (), account); } - /* if the account provider is something we can stick - in the folder-tree and not added by some other - component, then get the CamelStore and add it to - the folder-tree */ - if (is_storage && account->enabled) - mail_get_store (account->source->url, NULL, add_new_store, account); - if (gtk_toggle_button_get_active (gui->default_account)) mail_config_set_default_account (account); |