evolution-data-server r10093 - branches/gnome-2-24/camel/providers/local



Author: jeffcai
Date: Wed Feb 25 05:15:46 2009
New Revision: 10093
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=10093&view=rev

Log:
2009-02-25  Jeff Cai <jeff cai sun com>

    ** Fix for bug #567008

    * camel-local-summary.c: (camel_local_summary_class_init),
    (camel_local_summary_load), (local_summary_need_index):
    * camel-local-summary.h:
    * camel-spool-summary.c: (camel_spool_summary_class_init),
    (spool_summary_need_index):

    Avoiding the clearing of the uids in the spool summary if 
    forceindex is true.



Modified:
   branches/gnome-2-24/camel/providers/local/ChangeLog
   branches/gnome-2-24/camel/providers/local/camel-local-summary.c
   branches/gnome-2-24/camel/providers/local/camel-local-summary.h
   branches/gnome-2-24/camel/providers/local/camel-spool-summary.c

Modified: branches/gnome-2-24/camel/providers/local/camel-local-summary.c
==============================================================================
--- branches/gnome-2-24/camel/providers/local/camel-local-summary.c	(original)
+++ branches/gnome-2-24/camel/providers/local/camel-local-summary.c	Wed Feb 25 05:15:46 2009
@@ -65,6 +65,7 @@
 static int local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
 static int local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
 static CamelMessageInfo *local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
+static int local_summary_need_index();
 
 static void camel_local_summary_class_init (CamelLocalSummaryClass *klass);
 static void camel_local_summary_init       (CamelLocalSummary *obj);
@@ -111,6 +112,7 @@
 
 	klass->encode_x_evolution = local_summary_encode_x_evolution;
 	klass->decode_x_evolution = local_summary_decode_x_evolution;
+	klass->need_index = local_summary_need_index;
 }
 
 static void
@@ -160,7 +162,7 @@
 {
 	d(printf("Loading summary ...\n"));
 
-	if (forceindex
+	if ((forceindex && ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->need_index())
 	    || ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->load(cls, forceindex, ex) == -1) {
 		w(g_warning("Could not load summary: flags may be reset"));
 		camel_folder_summary_clear((CamelFolderSummary *)cls);
@@ -422,6 +424,11 @@
 	return ret;
 }
 
+static int
+local_summary_need_index() {
+	return 1;
+}
+
 static void
 update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info, CamelMessageInfoBase *old)
 {

Modified: branches/gnome-2-24/camel/providers/local/camel-local-summary.h
==============================================================================
--- branches/gnome-2-24/camel/providers/local/camel-local-summary.h	(original)
+++ branches/gnome-2-24/camel/providers/local/camel-local-summary.h	Wed Feb 25 05:15:46 2009
@@ -70,6 +70,7 @@
 
 	char *(*encode_x_evolution)(CamelLocalSummary *cls, const CamelLocalMessageInfo *info);
 	int (*decode_x_evolution)(CamelLocalSummary *cls, const char *xev, CamelLocalMessageInfo *info);
+	int (*need_index)();
 };
 
 CamelType	camel_local_summary_get_type	(void);

Modified: branches/gnome-2-24/camel/providers/local/camel-spool-summary.c
==============================================================================
--- branches/gnome-2-24/camel/providers/local/camel-spool-summary.c	(original)
+++ branches/gnome-2-24/camel/providers/local/camel-spool-summary.c	Wed Feb 25 05:15:46 2009
@@ -52,6 +52,7 @@
 static int spool_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
 
 static int spool_summary_sync_full(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
+static int spool_summary_need_index();
 
 static void camel_spool_summary_class_init (CamelSpoolSummaryClass *klass);
 static void camel_spool_summary_init       (CamelSpoolSummary *obj);
@@ -87,6 +88,7 @@
 
 	lklass->load = spool_summary_load;
 	lklass->check = spool_summary_check;
+	lklass->need_index = spool_summary_need_index;
 
 	mklass->sync_full = spool_summary_sync_full;
 }
@@ -342,3 +344,8 @@
 
 	return 0;
 }
+
+static int
+spool_summary_need_index() {
+	return 0;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]