From 03ed09a05cde5f6bed1b2cfdbc342b1257d77b3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adam=20Sj=C3=B8gren?= Date: Sun, 20 Dec 2009 17:18:38 +0100 Subject: [PATCH] Only set priority if it differs from normal. This is to avoid needless X-MSMail-Priority and X-Priority headers. --- src/modest-mail-operation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 27ede50..9b01218 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -865,11 +865,11 @@ create_msg_thread (gpointer thread_data) } if (new_msg) { - TnyHeader *header; + TnyHeader *header = tny_msg_get_header (new_msg); /* Set priority flags in message */ - header = tny_msg_get_header (new_msg); - tny_header_set_flag (header, info->priority_flags); + if (info->priority_flags != TNY_HEADER_FLAG_NORMAL_PRIORITY) + tny_header_set_flag (header, info->priority_flags); /* Set attachment flags in message */ if (info->attachments_list != NULL && attached > 0) @@ -950,7 +950,7 @@ modest_mail_operation_create_msg (ModestMailOperation *self, g_list_foreach (info->attachments_list, (GFunc) g_object_ref, NULL); info->images_list = g_list_copy ((GList *) images_list); g_list_foreach (info->images_list, (GFunc) g_object_ref, NULL); - info->priority_flags = priority_flags; + info->priority_flags = 0 | priority_flags; info->callback = callback; info->userdata = userdata; -- 1.7.9.5