Removed both "retrieve" and "limit retrieve" pickers from Account Settings
[modest] / src / modest-mail-operation.c
index 05c5c48..c7399b5 100644 (file)
@@ -63,6 +63,9 @@
 #include <libgnomevfs/gnome-vfs.h>
 #include "modest-utils.h"
 #include "modest-debug.h"
+#ifdef MODEST_USE_LIBTIME
+#include <clockd/libtime.h>
+#endif
 
 #define KB 1024
 
@@ -662,7 +665,7 @@ send_mail_on_sync_async_cb (TnyFolder *folder,
        self = helper->mail_op;
        priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
 
-       if (cancelled || err)
+       if (cancelled)
                goto end;
 
        if (err) {
@@ -747,7 +750,7 @@ send_mail_on_added_to_outbox (TnySendQueue *send_queue,
        self = helper->mail_op;
        priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
 
-       if (cancelled || err)
+       if (cancelled)
                goto end;
 
        if (err) {
@@ -1570,6 +1573,7 @@ inbox_refreshed_cb (TnyFolder *inbox,
        ModestAccountRetrieveType retrieve_type;
        TnyList *new_headers = NULL;
        gboolean headers_only, ignore_limit;
+       time_t time_to_store;
 
        info = (UpdateAccountInfo *) user_data;
        priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
@@ -1600,7 +1604,14 @@ inbox_refreshed_cb (TnyFolder *inbox,
        }
 
        /* Set the last updated as the current time */
-       modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL));
+#ifdef MODEST_USE_LIBTIME
+       struct tm utc_tm;
+       time_get_utc (&utc_tm);
+       time_to_store = time_mktime (&utc_tm, "GMT");
+#else
+       time_to_store = time (NULL);
+#endif
+       modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time_to_store);
 
        /* Get the message max size */
        max_size  = modest_conf_get_int (modest_runtime_get_conf (),
@@ -2086,7 +2097,7 @@ modest_mail_operation_create_folder (ModestMailOperation *self,
                }
        }
 
-       if (!strcmp (name, " ") || strchr (name, '/')) {
+       if (!priv->error && (!strcmp (name, " ") || strchr (name, '/'))) {
                priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
                g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
                             MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,