From 1d8fbbbee8bb4a0f59e3be299c0738328a0cc333 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 5 May 2008 09:03:31 +0000 Subject: [PATCH] * Removed some unused code * Fixes NB#85201, update the last updated string even though the Inbox refresh fails pmo-trunk-r4497 --- src/modest-mail-operation.c | 7 ++++--- src/widgets/modest-account-view.c | 25 ------------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 3c1bda9..cd2c552 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -1306,6 +1306,9 @@ inbox_refreshed_cb (TnyFolder *inbox, priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op); mgr = modest_runtime_get_account_mgr (); + /* Set the last updated as the current time, do it even if the inbox refresh failed */ + modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL)); + if (canceled || err) { priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED; if (err) @@ -1314,6 +1317,7 @@ inbox_refreshed_cb (TnyFolder *inbox, g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR, MODEST_MAIL_OPERATION_ERROR_OPERATION_CANCELED, "canceled"); + /* Notify the user about the error and then exit */ update_account_notify_user_and_free (info, NULL); return; @@ -1352,9 +1356,6 @@ inbox_refreshed_cb (TnyFolder *inbox, g_object_unref (info->inbox_observer); info->inbox_observer = NULL; - /* 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 (new_headers_array->len == 0) goto send_mail; diff --git a/src/widgets/modest-account-view.c b/src/widgets/modest-account-view.c index 75d0b53..be2c956 100644 --- a/src/widgets/modest-account-view.c +++ b/src/widgets/modest-account-view.c @@ -345,25 +345,6 @@ on_account_removed (TnyAccountStore *account_store, static void -on_account_changed (TnyAccountStore *account_store, - TnyAccount *account, - gpointer user_data) -{ - ModestAccountView *self = NULL; - ModestAccountViewPrivate *priv = NULL; - - g_return_if_fail (MODEST_IS_ACCOUNT_VIEW (user_data)); - g_return_if_fail (account); - g_return_if_fail (TNY_IS_ACCOUNT (account)); - - self = MODEST_ACCOUNT_VIEW (user_data); - priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE (self); - - /* Update account view */ -/* update_account_view (priv->account_mgr, self); */ -} - -static void on_account_default_toggled (GtkCellRendererToggle *cell_renderer, gchar *path, ModestAccountView *self) @@ -514,12 +495,6 @@ init_view (ModestAccountView *self) self); priv->sig_handlers = modest_signal_mgr_connect (priv->sig_handlers, - G_OBJECT (modest_runtime_get_account_store ()), - "account_changed", - G_CALLBACK(on_account_changed), - self); - priv->sig_handlers = - modest_signal_mgr_connect (priv->sig_handlers, G_OBJECT(priv->account_mgr), "account_busy_changed", G_CALLBACK(on_account_busy_changed), -- 1.7.9.5