aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-21 20:48:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-21 21:02:56 +0800
commit03f60542d6af94bf14775dac01b1221534081b71 (patch)
tree46c1be1c7689f267cbbfa16f8e3e670b200d6bc5
parentbfdec1f0aefc798f55803c7560b182ca983e27bf (diff)
downloadgsoc2013-evolution-03f60542d6af94bf14775dac01b1221534081b71.tar.gz
gsoc2013-evolution-03f60542d6af94bf14775dac01b1221534081b71.tar.zst
gsoc2013-evolution-03f60542d6af94bf14775dac01b1221534081b71.zip
Bug 692143 - Auto-configured MSN account should use POP, not IMAP
In e_mail_config_service_page_auto_configre(), we do detect that only POP3 is available for MSN accounts and switch to the appropriate service backend. The problem was with the hack I added awhile back to momentarily skip to the Receiving page just before skipping to the Summary page, so clicking "Go Back" from the Summary page would return to the Receiving page. That momentary skip triggered mail_config_assistant_prepare() on the Receiving page, which then triggered e_mail_config_page_setup_defaults() since the Receiving page was not yet in the visited pages hash table. The Receiving page's setup_defaults() method reset the service backend to IMAPX, which is the correct thing to do when not auto-configured. The solution is add the Receiving page to the visited pages hash table after a successful auto-configuration, but just BEFORE we momentarily skip to it. This tricks mail_config_assistant_prepare() into thinking the page was already visited, and it skips setting up defaults for it. Also added the Sending page to visited pages, just for consistency. (cherry picked from commit 0e0060e6398d2615534951d0192be71c7a3cc38e)
-rw-r--r--mail/e-mail-config-assistant.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c
index 2c10ca070f..ffccda5a4f 100644
--- a/mail/e-mail-config-assistant.c
+++ b/mail/e-mail-config-assistant.c
@@ -249,6 +249,12 @@ mail_config_assistant_autoconfigure_cb (GObject *source_object,
e_mail_config_service_page_auto_configure (
priv->sending_page, autoconfig);
+ /* Add these pages to the visited pages hash table to
+ * prevent calling e_mail_config_page_setup_defaults(). */
+
+ g_hash_table_add (priv->visited_pages, priv->receiving_page);
+ g_hash_table_add (priv->visited_pages, priv->sending_page);
+
/* Also set the initial display name to the email address
* given so the user can just click past the Summary page. */
email_address = e_mail_autoconfig_get_email_address (autoconfig);