[evolution] Bug 692143 - Auto-configured MSN account should use POP, not IMAP



commit 0e0060e6398d2615534951d0192be71c7a3cc38e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jan 21 07:48:49 2013 -0500

    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.

 mail/e-mail-config-assistant.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c
index 92bd971..9d46764 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]