aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-account-prefs.c18
-rw-r--r--mail/em-account-prefs.h1
3 files changed, 25 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f82d8fb103..dec2675a4c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2006-02-08 Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
+
+ **Fixes #329586
+
+ * em-account-prefs.c:
+ * em-account-prefs.h: Changed the ODD behavior of Default button by
+ checking whether an account is default or not and disabling the button
+ when default account is in focus.
+
+ Committing to head on behalf of rajeev
+
2006-02-08 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
* em-account-prefs.c: (em_account_prefs_construct): Reordering
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index d79a5f846b..2e54404fc7 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -396,6 +396,8 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
GtkTreeIter iter;
const char *url = NULL;
int state;
+ EAccount *default_account;
+ default_account = mail_config_get_default_account ();
state = gconf_client_key_is_writable(mail_config_get_gconf_client(), "/apps/evolution/mail/accounts", NULL);
if (state) {
@@ -419,7 +421,12 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), !mail_config_has_proxies(account));
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_delete), state);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), state);
+
+ if(account == default_account)
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), FALSE);
+ else
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), state);
+
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_able), state);
}
@@ -474,9 +481,8 @@ mail_accounts_load (EMAccountPrefs *prefs)
camel_url_free (url);
/* select the first row by default */
- if (row == 0)
+ if (row == 0 && !prefs->changed)
gtk_tree_selection_select_iter (selection, &iter);
-
row++;
}
@@ -570,9 +576,11 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
renderer = g_object_get_data ((GObject *) widget, "renderer");
g_signal_connect (renderer, "toggled", G_CALLBACK (account_able_toggled), prefs);
-
+
+ prefs->changed = FALSE;
mail_accounts_load (prefs);
-
+ prefs->changed = TRUE;
+
prefs->mail_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAdd"));
g_signal_connect (prefs->mail_add, "clicked", G_CALLBACK (account_add_clicked), prefs);
diff --git a/mail/em-account-prefs.h b/mail/em-account-prefs.h
index 99cf676b2c..c8deb6f85e 100644
--- a/mail/em-account-prefs.h
+++ b/mail/em-account-prefs.h
@@ -70,6 +70,7 @@ struct _EMAccountPrefs {
GtkButton *mail_able;
guint destroyed : 1;
+ guint changed : 1;
};
struct _EMAccountPrefsClass {