aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-gui.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-21 10:21:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-21 10:21:12 +0800
commitf21fc37e3c2025f2a6b4ed3a24123d2a7fd5eed4 (patch)
tree3ff576d259a84975fb59178039a0625ac67c73d5 /mail/mail-account-gui.c
parenta7006d79617c55e3cd774ad7589d8d71585dae7d (diff)
downloadgsoc2013-evolution-f21fc37e3c2025f2a6b4ed3a24123d2a7fd5eed4.tar.gz
gsoc2013-evolution-f21fc37e3c2025f2a6b4ed3a24123d2a7fd5eed4.tar.zst
gsoc2013-evolution-f21fc37e3c2025f2a6b4ed3a24123d2a7fd5eed4.zip
Only add the account if it doesn't already exist in the config db.
2001-09-20 Jeffrey Stedfast <fejj@ximian.com> * mail-account-gui.c (mail_account_gui_save): Only add the account if it doesn't already exist in the config db. * mail-config.c (mail_config_find_account): New convenience function. svn path=/trunk/; revision=13039
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r--mail/mail-account-gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 9189283afb..c8281be799 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1195,8 +1195,8 @@ mail_account_gui_new (MailConfigAccount *account)
gui->default_account = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "management_default"));
if (account->name)
e_utf8_gtk_entry_set_text (gui->account_name, account->name);
- if (!mail_config_get_default_account()
- || (account == mail_config_get_default_account()))
+ if (!mail_config_get_default_account ()
+ || (account == mail_config_get_default_account ()))
gtk_toggle_button_set_active (gui->default_account, TRUE);
/* Identity */
@@ -1657,7 +1657,8 @@ mail_account_gui_save (MailAccountGui *gui)
account->smime_encrypt_to_self = gtk_toggle_button_get_active (gui->smime_encrypt_to_self);
account->smime_always_sign = gtk_toggle_button_get_active (gui->smime_always_sign);
- mail_config_add_account (account);
+ if (!mail_config_find_account (account))
+ mail_config_add_account (account);
if (gtk_toggle_button_get_active (gui->default_account))
mail_config_set_default_account (account);