[evolution-ews] evolution-ews: allow set/reset of Importance flag
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] evolution-ews: allow set/reset of Importance flag
- Date: Fri, 15 Jul 2011 17:53:47 +0000 (UTC)
commit 68f9754c205f5f20e1e0402b1acc082b187c3de5
Author: James Bottomley <JBottomley Parallels com>
Date: Wed Jul 13 15:49:17 2011 -0500
evolution-ews: allow set/reset of Importance flag
When you have a lot of people who set the Importance flag to high on
all their incoming messages, it's useful to be able to reset it so
that only genuinely important messages remain flagged in your folders.
This patch implements the ability to set the Importance flag from
evolution.
Signed-off-by: James Bottomley <JBottomley Parallels com>
src/camel/camel-ews-folder.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index d71f359..a169f3c 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -591,6 +591,27 @@ msg_update_flags (ESoapMessage *msg, gpointer user_data)
e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
mi->info.uid, mi->change_key, 0);
+ if (flags_changed & CAMEL_MESSAGE_FLAGGED) {
+ const char *flag;
+
+ if (mi->info.flags & CAMEL_MESSAGE_FLAGGED)
+ flag = "High";
+ else
+ flag = "Normal";
+
+ e_soap_message_start_element (msg, "SetItemField", NULL, NULL);
+
+ e_soap_message_start_element (msg, "FieldURI", NULL, NULL);
+ e_soap_message_add_attribute (msg, "FieldURI", "item:Importance", NULL, NULL);
+ e_soap_message_end_element (msg);
+
+ e_soap_message_start_element (msg, "Message", NULL, NULL);
+
+ e_ews_message_write_string_parameter (msg, "Importance", NULL, flag);
+
+ e_soap_message_end_element (msg); /* Message */
+ e_soap_message_end_element (msg); /* SetItemField */
+ }
if (flags_changed & CAMEL_MESSAGE_SEEN) {
e_soap_message_start_element (msg, "SetItemField", NULL, NULL);
@@ -708,7 +729,7 @@ ews_synchronize_sync (CamelFolder *folder, gboolean expunge, EVO3(GCancellable *
/* Exchange doesn't seem to have a sane representation
for most flags â not even replied/forwarded. */
- if (flags_changed & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_FORWARDED)) {
+ if (flags_changed & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_FORWARDED|CAMEL_MESSAGE_FLAGGED)) {
mi_list = g_slist_append (mi_list, mi);
mi_list_len++;
} else if (flags_changed & CAMEL_MESSAGE_DELETED) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]