diff options
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r-- | mail/em-account-editor.c | 13 |
1 files changed, 11 insertions, 2 deletions
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)) |