* src/modest-account-mgr-helpers.c:
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 29 Feb 2008 14:05:58 +0000 (14:05 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 29 Feb 2008 14:05:58 +0000 (14:05 +0000)
        * 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
src/modest-mail-operation.c

index 646d59e..33f88fe 100644 (file)
@@ -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;
 
 }
index c2b99ec..b441d2a 100644 (file)
@@ -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);
        }