From: Alberto Garcia Date: Thu, 28 Feb 2008 12:33:53 +0000 (+0000) Subject: * src/modest-tny-account-store.c X-Git-Tag: git_migration_finished~1615 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=415c2d0831e6b729f0d7831f5ce6439cd0e5c09a * src/modest-tny-account-store.c (modest_tny_account_store_alert): Don't show the "Secure connection failed" in any authentication error. Use specific errors for POP, IMAP and SMTP instead. Fixes NB#81204 pmo-trunk-r4245 --- diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index e0cd50b..d741fcb 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1058,7 +1058,6 @@ modest_tny_account_store_alert (TnyAccountStore *self, case TNY_SERVICE_ERROR_UNAVAILABLE: /* You must be working online for this operation */ case TNY_SERVICE_ERROR_CONNECT: - /* TODO: Show the appropriate message, depending on whether it's POP or IMAP: */ switch (proto) { case MODEST_PROTOCOL_STORE_POP: prompt = g_strdup_printf (_("emev_ni_ui_pop3_msg_connect_error"), @@ -1078,9 +1077,25 @@ modest_tny_account_store_alert (TnyAccountStore *self, break; case TNY_SERVICE_ERROR_AUTHENTICATE: - /* This is "Secure connection failed", even though the logical - * ID has _certificate_ in the name: */ - prompt = g_strdup (_("mail_ni_ssl_certificate_error")); + /* It seems that there's no better error to show with + * POP and IMAP because TNY_SERVICE_ERROR_AUTHENTICATE + * may appear if there's a timeout during auth */ + switch (proto) { + case MODEST_PROTOCOL_STORE_POP: + prompt = g_strdup_printf (_("emev_ni_ui_pop3_msg_connect_error"), + server_name); + break; + case MODEST_PROTOCOL_STORE_IMAP: + prompt = g_strdup_printf (_("emev_ni_ui_imap_connect_server_error"), + server_name); + break; + case MODEST_PROTOCOL_TRANSPORT_SMTP: + prompt = g_strdup_printf (_("emev_ni_ui_smtp_authentication_fail_error"), + server_name); + break; + default: + g_return_val_if_reached (FALSE); + } break; case TNY_SERVICE_ERROR_CERTIFICATE: