[evolution-data-server/wip/camel-more-gobject: 62/62] IMAPx message info saves and loads server_flags to/from folder summary
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/camel-more-gobject: 62/62] IMAPx message info saves and loads server_flags to/from folder summary
- Date: Mon, 19 Sep 2016 11:14:08 +0000 (UTC)
commit b9b54c1689c1fd43d091a3013a9239b3fb31ba2f
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 14 21:20:10 2016 +0200
IMAPx message info saves and loads server_flags to/from folder summary
I missed that when porting it.
camel/providers/imapx/camel-imapx-message-info.c | 28 ++++++++++++++++++++-
1 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-message-info.c
b/camel/providers/imapx/camel-imapx-message-info.c
index 3e6ac75..9a324d1 100644
--- a/camel/providers/imapx/camel-imapx-message-info.c
+++ b/camel/providers/imapx/camel-imapx-message-info.c
@@ -84,14 +84,37 @@ imapx_message_info_load (CamelMessageInfo *mi,
imi = CAMEL_IMAPX_MESSAGE_INFO (mi);
- /* Reset server-side information, which is not saved into the summary anyway. */
- camel_imapx_message_info_set_server_flags (imi, 0);
+ camel_imapx_message_info_set_server_flags (imi, camel_util_bdata_get_number (bdata_ptr, 0));
+
+ /* Reset server-side information, which is not saved into the summary. */
camel_imapx_message_info_take_server_user_flags (imi, NULL);
camel_imapx_message_info_take_server_user_tags (imi, NULL);
return TRUE;
}
+static gboolean
+imapx_message_info_save (const CamelMessageInfo *mi,
+ CamelMIRecord *record,
+ GString *bdata_str)
+{
+ CamelIMAPXMessageInfo *imi;
+
+ g_return_val_if_fail (CAMEL_IS_IMAPX_MESSAGE_INFO (mi), FALSE);
+ g_return_val_if_fail (record != NULL, FALSE);
+ g_return_val_if_fail (bdata_str != NULL, FALSE);
+
+ if (!CAMEL_MESSAGE_INFO_CLASS (camel_imapx_message_info_parent_class)->save ||
+ !CAMEL_MESSAGE_INFO_CLASS (camel_imapx_message_info_parent_class)->save (mi, record, bdata_str))
+ return FALSE;
+
+ imi = CAMEL_IMAPX_MESSAGE_INFO (mi);
+
+ camel_util_bdata_put_number (bdata_str, camel_imapx_message_info_get_server_flags (imi));
+
+ return TRUE;
+}
+
static void
imapx_message_info_set_property (GObject *object,
guint property_id,
@@ -168,6 +191,7 @@ camel_imapx_message_info_class_init (CamelIMAPXMessageInfoClass *class)
mi_class = CAMEL_MESSAGE_INFO_CLASS (class);
mi_class->clone = imapx_message_info_clone;
mi_class->load = imapx_message_info_load;
+ mi_class->save = imapx_message_info_save;
object_class = G_OBJECT_CLASS (class);
object_class->set_property = imapx_message_info_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]