gdk_threads_leave ();
}
+ /* Notify about operation end */
+ modest_mail_operation_notify_end (self);
/* Free */
g_object_unref (helper->mail_op);
g_object_unref (helper->header);
g_slice_free (GetMsgAsyncHelper, helper);
- /* Notify about operation end */
- modest_mail_operation_notify_end (self);
}
static void
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
- if(priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED)
+ if(priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ TnyFolder *folder = tny_header_get_folder (helper->header);
+ if (folder) {
+ TnyAccount *account;
+ account = tny_folder_get_account (folder);
+ if (account) {
+ tny_account_cancel (account);
+ g_object_unref (account);
+ }
+ g_object_unref (folder);
+ }
+
return;
+ }
priv->done = 1;
priv->total = 1;
info_notify, NULL);
}
g_object_unref (msg);
- }
+ }
} else {
/* Set status failed and set an error */
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
operation. The error will be shown by the error_handler of
the mail operation */
if (!modest_ui_actions_msg_retrieval_check (mail_op, header, msg)) {
- printf ("DEBUG: %s: modest_ui_actions_msg_retrieval_check() failed.\n",
- __FUNCTION__);
return;
}