[evolution-patches] [Mailer] Fixes Bug #329586
- From: Rajeev ramanathan <rajeev_evolution yahoo com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] [Mailer] Fixes Bug #329586
- Date: Mon, 6 Feb 2006 19:06:51 -0800 (PST)
Hi,
changed the ODD behavior of default button by editing code in
* em-account-prefs.c
* em-account-prefs.h
and
..disabled Default button when default account is in focus
..stopped focus moving to first account when an account is made default
Rajeev
Relax. Yahoo! Mail
virus scanning helps detect nasty viruses!
Index: em-account-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-account-prefs.c,v
retrieving revision 1.23
diff -u -p -r1.23 em-account-prefs.c
--- em-account-prefs.c 23 Jan 2006 08:18:09 -0000 1.23
+++ em-account-prefs.c 7 Feb 2006 02:48:54 -0000
@@ -396,6 +396,8 @@ account_cursor_change (GtkTreeSelection
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
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 *pref
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++;
}
@@ -573,9 +579,11 @@ em_account_prefs_construct (EMAccountPre
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);
Index: em-account-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-account-prefs.h,v
retrieving revision 1.7
diff -u -p -r1.7 em-account-prefs.h
--- em-account-prefs.h 17 Jun 2005 15:20:29 -0000 1.7
+++ em-account-prefs.h 7 Feb 2006 02:48:59 -0000
@@ -70,6 +70,7 @@ struct _EMAccountPrefs {
GtkButton *mail_able;
guint destroyed : 1;
+ guint changed : 1;
};
struct _EMAccountPrefsClass {
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3785
diff -u -p -r1.3785 ChangeLog
--- ChangeLog 2 Feb 2006 05:14:15 -0000 1.3785
+++ ChangeLog 7 Feb 2006 02:55:46 -0000
@@ -1,3 +1,12 @@
+2006-02-07 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.
+
2006-02-02 Parthasarathi Susarla <sparthasarathi novell com>
* em-composer-utils.c: (em_utils_handle_receipt):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]