From 22df4a1b619ba37528d6b3e449bc752d7694900e Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Fri, 29 Feb 2008 14:05:58 +0000 Subject: [PATCH] * src/modest-account-mgr-helpers.c: * When we set new server configuration, we forget that we had succeeded to connect with a username (fixes NB#80728). * src/modest-mail-operation.c: * When we succeed to refresh or retrieve an account, then we set that the username has succeeded pmo-trunk-r4257 --- src/modest-account-mgr-helpers.c | 4 ++++ src/modest-mail-operation.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/modest-account-mgr-helpers.c b/src/modest-account-mgr-helpers.c index 646d59e..33f88fe 100644 --- a/src/modest-account-mgr-helpers.c +++ b/src/modest-account-mgr-helpers.c @@ -525,6 +525,10 @@ modest_account_mgr_save_server_settings (ModestAccountMgr *self, protocol, TRUE)); } + if (!has_errors) { + modest_account_mgr_set_server_account_username_has_succeeded (self, account_name, FALSE); + } + return !has_errors; } diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index c2b99ec..b441d2a 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -1264,6 +1264,8 @@ inbox_refreshed_cb (TnyFolder *inbox, /* Update the last updated key, even if we don't have to get new headers */ modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL)); + if (!canceled && !err) + modest_account_mgr_set_server_account_username_has_succeeded (mgr, tny_account_get_id (priv->account), TRUE); if (new_headers_array->len == 0) goto send_mail; @@ -2833,6 +2835,8 @@ on_refresh_folder (TnyFolder *folder, const gchar *name; name = modest_tny_account_get_parent_modest_account_name_for_server_account (account); modest_account_mgr_set_last_updated (mgr, tny_account_get_id (account), time (NULL)); + if (!cancelled && !error) + modest_account_mgr_set_server_account_username_has_succeeded (mgr, tny_account_get_id (account), TRUE); modest_account_mgr_set_account_busy (mgr, name, FALSE); g_object_unref (account); } -- 1.7.9.5