aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2006-02-24 13:08:52 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2006-02-24 13:08:52 +0800
commit946343d4804ec5c09ff13c69ae161cd616f2f514 (patch)
treed5ef5a1605bb76fc8f0f426b6bf8b12cee80602c
parent5e9ef016916499fd22d3da2c2acaab71a5205a98 (diff)
downloadgsoc2013-evolution-946343d4804ec5c09ff13c69ae161cd616f2f514.tar.gz
gsoc2013-evolution-946343d4804ec5c09ff13c69ae161cd616f2f514.tar.zst
gsoc2013-evolution-946343d4804ec5c09ff13c69ae161cd616f2f514.zip
Added code to handle the case if the account is marked as default. Fixes
2006-02-24 Sankar P <psankar@novell.com> * em-account-editor.c: (emae_check_complete) (emae_identity_page): Added code to handle the case if the account is marked as default. Fixes #332034 svn path=/trunk/; revision=31573
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-account-editor.c13
2 files changed, 18 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 82a9f401f5..7313caf07a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-24 Sankar P <psankar@novell.com>
+
+ * em-account-editor.c: (emae_check_complete)
+ (emae_identity_page): Added code to handle the case if the
+ account is marked as default.
+ Fixes #332034
+
2006-02-21 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes bug #329733
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 23a9f5a15c..ba51b4e741 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -1744,8 +1744,9 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
gui->default_account = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "management_default"));
if (!mail_config_get_default_account ()
- || (account == mail_config_get_default_account ()))
- gtk_toggle_button_set_active (gui->default_account, TRUE);
+ || (account == mail_config_get_default_account ())
+ || (GPOINTER_TO_INT(g_object_get_data (emae->account, "default_flagged"))) )
+ gtk_toggle_button_set_active (gui->default_account, TRUE);
if (emae->do_signature) {
emae_setup_signatures(emae, xml);
@@ -2581,6 +2582,14 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
}
+ /*
+ Setting a flag on the Account if it is marked as default. It is done in this way instead of
+ using a temporary variable so as to keep track of which account is marked as default in case of
+ editing multiple accounts at a time
+ */
+ if (gtk_toggle_button_get_active(emae->priv->default_account))
+ g_object_set_data (emae->account, "default_flagged", GINT_TO_POINTER(1));
+
if (pageid == NULL || !strcmp(pageid, "00.identity")) {
/* TODO: check the account name is set, and unique in the account list */
ok = (tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_NAME))