From 4a07a734c4c95421421cd9a94dabc6afd5ba93e2 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Wed, 27 Feb 2008 20:49:32 +0000 Subject: [PATCH] * src/widgets/modest-account-view.c: (get_last_updated_string): Remove obsolete comment * src/modest-mail-operation.c (modest_mail_operation_refresh_folder): (on_refresh_folder): If the folder is remote, mark its account as busy during the refresh and set the "Last updated" time afterwards Fixes NB#81471 pmo-trunk-r4239 --- src/modest-mail-operation.c | 17 +++++++++++++++++ src/widgets/modest-account-view.c | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 55d5c86..c2b99ec 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2826,6 +2826,17 @@ on_refresh_folder (TnyFolder *folder, g_return_if_fail(priv!=NULL); + /* If the folder is remote, set the "Last updated" value */ + if (modest_tny_folder_is_remote_folder (folder)) { + TnyAccount *account = modest_tny_folder_get_account (folder); + ModestAccountMgr *mgr = modest_runtime_get_account_mgr (); + 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)); + modest_account_mgr_set_account_busy (mgr, name, FALSE); + g_object_unref (account); + } + if (error) { priv->error = g_error_copy (error); priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED; @@ -2918,6 +2929,12 @@ modest_mail_operation_refresh_folder (ModestMailOperation *self, /* Refresh the folder. TODO: tinymail could issue a status updates before the callback call then this could happen. We must review the design */ + if (modest_tny_folder_is_remote_folder (folder)) { + /* If the folder is remote, mark its account as busy */ + const gchar *name; + name = modest_tny_account_get_parent_modest_account_name_for_server_account (priv->account); + modest_account_mgr_set_account_busy (modest_runtime_get_account_mgr (), name, TRUE); + } modest_mail_operation_notify_start (self); /* notify that the operation was started */ diff --git a/src/widgets/modest-account-view.c b/src/widgets/modest-account-view.c index 46c7048..75d0b53 100644 --- a/src/widgets/modest-account-view.c +++ b/src/widgets/modest-account-view.c @@ -174,7 +174,6 @@ get_last_updated_string(ModestAccountMgr* account_mgr, ModestAccountSettings *se else last_updated_string = _("mcen_va_never"); } else { - /* FIXME: There should be a logical name in the UI specs */ last_updated_string = _("mcen_va_refreshing"); } -- 1.7.9.5