From d9833b43ab0c4757fa136ef925a1f6245efc926f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 22 Jun 2012 15:25:19 -0400 Subject: Bug 678608 - Please enter password for mail account "Unnamed" --- mail/e-mail-config-assistant.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mail/e-mail-config-assistant.c') diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c index 70f60e66ea..e6fa0e3074 100644 --- a/mail/e-mail-config-assistant.c +++ b/mail/e-mail-config-assistant.c @@ -745,6 +745,7 @@ mail_config_assistant_prepare (GtkAssistant *assistant, GtkWidget *page) { EMailConfigAssistantPrivate *priv; + gboolean first_visit = FALSE; priv = E_MAIL_CONFIG_ASSISTANT_GET_PRIVATE (assistant); @@ -754,6 +755,7 @@ mail_config_assistant_prepare (GtkAssistant *assistant, e_mail_config_page_setup_defaults ( E_MAIL_CONFIG_PAGE (page)); g_hash_table_add (priv->visited_pages, page); + first_visit = TRUE; } if (E_IS_MAIL_CONFIG_LOOKUP_PAGE (page)) { @@ -773,6 +775,24 @@ mail_config_assistant_prepare (GtkAssistant *assistant, mail_config_assistant_autoconfigure_cb, g_object_ref (assistant)); } + + if (E_IS_MAIL_CONFIG_RECEIVING_PAGE (page) && first_visit) { + ESource *source; + ESourceMailIdentity *extension; + const gchar *email_address; + const gchar *extension_name; + + /* Use the email address from the Identity Page as + * the initial display name, so in case we have to + * query a remote mail server, the password prompt + * will have a more meaningful description. */ + + source = priv->identity_source; + extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY; + extension = e_source_get_extension (source, extension_name); + email_address = e_source_mail_identity_get_address (extension); + e_source_set_display_name (source, email_address); + } } static void -- cgit v1.2.3