X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation.c;h=559599347761a5593a1ec83f74554b3c661a445c;hp=8b38cd695ad3b41d1373e785c64ddd2e2f088f27;hb=d35c9918f4df9384dee13049f7d3344a47227f22;hpb=f541209a85cb6c71c79da1df81afbe10c448690a diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 8b38cd6..5595993 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -701,18 +701,19 @@ create_msg_thread (gpointer thread_data) CreateMsgInfo *info = (CreateMsgInfo *) thread_data; TnyMsg *new_msg = NULL; ModestMailOperationPrivate *priv; + gint attached = 0; priv = MODEST_MAIL_OPERATION_GET_PRIVATE(info->mail_op); if (info->html_body == NULL) { new_msg = modest_tny_msg_new (info->to, info->from, info->cc, info->bcc, info->subject, info->plain_body, - info->attachments_list, + info->attachments_list, &attached, &(priv->error)); } else { new_msg = modest_tny_msg_new_html_plain (info->to, info->from, info->cc, info->bcc, info->subject, info->html_body, info->plain_body, info->attachments_list, - info->images_list, + info->images_list, &attached, &(priv->error)); } @@ -724,7 +725,7 @@ create_msg_thread (gpointer thread_data) tny_header_set_flag (header, info->priority_flags); /* Set attachment flags in message */ - if (info->attachments_list != NULL) + if (info->attachments_list != NULL && attached > 0) tny_header_set_flag (header, TNY_HEADER_FLAG_ATTACHMENTS); g_object_unref (G_OBJECT(header)); @@ -2865,6 +2866,7 @@ modest_mail_operation_xfer_msgs (ModestMailOperation *self, ModestTnyFolderRules rules = 0; TnyAccount *dst_account = NULL; gboolean leave_on_server; + ModestMailOperationState *state; g_return_if_fail (self && MODEST_IS_MAIL_OPERATION (self)); g_return_if_fail (headers && TNY_IS_LIST (headers)); @@ -2976,6 +2978,14 @@ modest_mail_operation_xfer_msgs (ModestMailOperation *self, helper->delete = (leave_on_server) ? FALSE : delete_original; modest_mail_operation_notify_start (self); + + /* Start notifying progress */ + state = modest_mail_operation_clone_state (self); + state->done = 0; + state->total = 0; + g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, state, NULL); + g_slice_free (ModestMailOperationState, state); + tny_folder_transfer_msgs_async (src_folder, helper->headers, folder,