X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation.c;h=f1ecaa5d6eb0becbfb050f9f8c48021505d6baca;hp=1f49f121d84ddc7e9f575a7dc9c4b2a908787ef3;hb=8ed05d001f888c47a70ba2500febf7b61eae162f;hpb=d177faf17e34f7cffde5be9f86387dcd92f852e9 diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 1f49f12..f1ecaa5 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -626,6 +626,7 @@ modest_mail_operation_send_mail (ModestMailOperation *self, modest_mail_operation_notify_start (self); tny_send_queue_add_async (send_queue, msg, NULL, NULL, NULL); + modest_tny_send_queue_set_requested_send_receive (MODEST_TNY_SEND_QUEUE (send_queue), FALSE); priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS; modest_mail_operation_notify_end (self); @@ -1180,6 +1181,7 @@ typedef struct gboolean poke_all; TnyFolderObserver *inbox_observer; RetrieveAllCallback retrieve_all_cb; + gboolean interactive; } UpdateAccountInfo; @@ -1372,6 +1374,8 @@ inbox_refreshed_cb (TnyFolder *inbox, /* Try to send */ tny_camel_send_queue_flush (TNY_CAMEL_SEND_QUEUE (send_queue)); + modest_tny_send_queue_set_requested_send_receive (MODEST_TNY_SEND_QUEUE (send_queue), + info->interactive); } } @@ -1491,6 +1495,7 @@ void modest_mail_operation_update_account (ModestMailOperation *self, const gchar *account_name, gboolean poke_all, + gboolean interactive, RetrieveAllCallback retrieve_all_cb, UpdateAccountCallback callback, gpointer user_data) @@ -1539,6 +1544,7 @@ modest_mail_operation_update_account (ModestMailOperation *self, info->folders = tny_simple_list_new (); info->mail_op = g_object_ref (self); info->poke_all = poke_all; + info->interactive = interactive; info->account_name = g_strdup (account_name); info->callback = callback; info->user_data = user_data; @@ -2177,10 +2183,10 @@ get_msg_async_cb (TnyFolder *folder, } /* If canceled by the user, ignore the error given by Tinymail */ - if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) { + if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED || canceled) { canceled = TRUE; finished = TRUE; - } else if (canceled || err) { + } else if (err) { priv->status = MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS; if (err) { priv->error = g_error_copy ((const GError *) err); @@ -2265,6 +2271,7 @@ modest_mail_operation_get_msgs_full (ModestMailOperation *self, has_uncached_messages = TRUE; g_object_unref (header); } + g_object_unref (iter); priv->op_type = has_uncached_messages?MODEST_MAIL_OPERATION_TYPE_RECEIVE:MODEST_MAIL_OPERATION_TYPE_OPEN; /* Get account and set it into mail_operation */