aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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:14 +0800
commit0e0060e6398d2615534951d0192be71c7a3cc38e (patch)
tree0609b40f5d51aed204d10fc74628ca517da40bd1 /mail
parent43911af529c0f357f71b4bb74b8a8c30db9ed384 (diff)
downloadgsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar.gz
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar.bz2
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar.lz
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar.xz
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.tar.zst
gsoc2013-evolution-0e0060e6398d2615534951d0192be71c7a3cc38e.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.
Diffstat (limited to 'mail')
-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 92bd971148..9d46764255 100644
--- a/mail/e-mail-config-assistant.c
+++ b/mail/e-mail-config-assistant.c
@@ -299,6 +299,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);