aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-03-03 05:51:45 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-03-03 05:51:45 +0800
commit76b8dbf6391c455beb300fe69166b57f56244783 (patch)
treed0bbca565a393617366075fbd2004aee8e07ee3a /camel
parent5c955ac50f5e749d8b6fcf89d0e0820345734c2a (diff)
downloadgsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar.gz
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar.bz2
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar.lz
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar.xz
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.tar.zst
gsoc2013-evolution-76b8dbf6391c455beb300fe69166b57f56244783.zip
Overrides the parent method. We don't want to encode user flags/tags or
2004-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (mbox_summary_encode_x_evolution): Overrides the parent method. We don't want to encode user flags/tags or the size of the header will change and force a complete rewrite of the mbox file. svn path=/trunk/; revision=24937
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/local/camel-mbox-summary.c23
2 files changed, 30 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 1932b03d14..84adfa5ec4 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-02 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/local/camel-mbox-summary.c
+ (mbox_summary_encode_x_evolution): Overrides the parent method. We
+ don't want to encode user flags/tags or the size of the header
+ will change and force a complete rewrite of the mbox file.
+
2004-02-25 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (camel_filter_driver_filter_folder): Free
@@ -9,7 +16,7 @@
corruption if using Heimdal's implementation of Kerberos5. Yay
Heimdal.
-2004-02-25 <rodo@ximian.com>
+2004-02-25 Radek Doulik <rodo@ximian.com>
* camel-folder.c (get_unread_message_count): do not avoid junk
mails in unread count
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index ac87fd2476..c34df06114 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -35,6 +35,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+#include <ctype.h>
#include "camel-mbox-summary.h"
#include "camel/camel-file-utils.h"
@@ -55,6 +56,8 @@ static CamelMessageInfo * message_info_load (CamelFolderSummary *, FILE *);
static int message_info_save (CamelFolderSummary *, FILE *, CamelMessageInfo *);
/*static void message_info_free (CamelFolderSummary *, CamelMessageInfo *);*/
+static char *mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelMessageInfo *mi);
+
static int mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
static int mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
#ifdef STATUS_PINE
@@ -113,7 +116,8 @@ camel_mbox_summary_class_init(CamelMboxSummaryClass *klass)
sklass->message_info_load = message_info_load;
sklass->message_info_save = message_info_save;
/*sklass->message_info_free = message_info_free;*/
-
+
+ lklass->encode_x_evolution = mbox_summary_encode_x_evolution;
lklass->check = mbox_summary_check;
lklass->sync = mbox_summary_sync;
#ifdef STATUS_PINE
@@ -164,6 +168,23 @@ void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, int state)
mbs->xstatus = state;
}
+static char *
+mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelMessageInfo *mi)
+{
+ const char *p, *uidstr;
+ guint32 uid;
+
+ p = uidstr = camel_message_info_uid (mi);
+ while (*p && isdigit (*p))
+ p++;
+
+ if (*p == 0 && sscanf (uidstr, "%u", &uid) == 1) {
+ return g_strdup_printf ("%08x-%04x", uid, mi->flags & 0xffff);
+ } else {
+ return g_strdup_printf ("%s-%04x", uidstr, mi->flags & 0xffff);
+ }
+}
+
static int
summary_header_load(CamelFolderSummary *s, FILE *in)
{