Commit 0e0060e6 authored by Matthew Barnes's avatar Matthew Barnes
Browse files

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.
parent 43911af5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment