From 93f1026bac7fc03ff2395ee29de1366bbb9d01a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Fri, 8 May 2009 12:49:00 +0200 Subject: [PATCH] Fixes NB#115566, do not show "invalid username or password" on connection errors --- src/modest-tny-account-store.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 788ea2d..d887e9e 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -493,7 +493,8 @@ show_password_warning_only (const gchar *msg) } static void -show_wrong_password_dialog (TnyAccount *account) +show_wrong_password_dialog (TnyAccount *account, + gboolean show_banner) { if (g_object_get_data (G_OBJECT (account), "connection_specific") != NULL) { modest_ui_actions_on_smtp_servers (NULL, NULL); @@ -519,7 +520,8 @@ show_wrong_password_dialog (TnyAccount *account) } } /* Show an explanatory temporary banner: */ - modest_platform_information_banner (NULL, NULL, _("mcen_ib_username_pw_incorrect")); + if (show_banner) + modest_platform_information_banner (NULL, NULL, _("mcen_ib_username_pw_incorrect")); } /* This callback will be called by Tinymail when it needs the password @@ -650,7 +652,7 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc if (settings_have_password) { /* The password must be wrong, so show the account settings dialog so it can be corrected: */ - show_wrong_password_dialog (account); + show_wrong_password_dialog (account, TRUE); if (cancel) *cancel = TRUE; @@ -1127,7 +1129,8 @@ modest_tny_account_store_alert (TnyAccountStore *self, allows us to minimize the number of times that we incorrectly show the dialog */ if (tny_device_is_online (device)) - show_wrong_password_dialog (account); + show_wrong_password_dialog (account, + (error->code == TNY_SERVICE_ERROR_CONNECT) ? FALSE : TRUE); retval = TRUE; } -- 1.7.9.5