evolution-data-server r9451 - trunk/camel/providers/local
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9451 - trunk/camel/providers/local
- Date: Sun, 31 Aug 2008 05:10:49 +0000 (UTC)
Author: sragavan
Date: Sun Aug 31 05:10:49 2008
New Revision: 9451
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9451&view=rev
Log:
2008-08-30 Srinivasa Ragavan <sragavan novell com>
* camel/providers/local/camel-spool-summary.c: Fixed folder summary
mismatch for spool
Modified:
trunk/camel/providers/local/ChangeLog
trunk/camel/providers/local/camel-spool-summary.c
Modified: trunk/camel/providers/local/camel-spool-summary.c
==============================================================================
--- trunk/camel/providers/local/camel-spool-summary.c (original)
+++ trunk/camel/providers/local/camel-spool-summary.c Sun Aug 31 05:10:49 2008
@@ -105,13 +105,30 @@
/*CamelSpoolSummary *mbs = CAMEL_SPOOL_SUMMARY(obj);*/
}
+static int
+frompos_sort (void *enc, int len1, void * data1, int len2, void *data2)
+{
+ char *sa1 = (char*)g_utf8_normalize (data1, len1, G_NORMALIZE_DEFAULT);
+ char *sa2 = (char*)g_utf8_normalize (data2, len2, G_NORMALIZE_DEFAULT);
+ int a1 = strtoul (sa1, NULL, 10);
+ int a2 = strtoul (sa2, NULL, 10);
+
+ g_free(sa1); g_free(sa2);
+
+ return a1 > a2;
+}
+
CamelSpoolSummary *
camel_spool_summary_new(struct _CamelFolder *folder, const char *mbox_name)
{
CamelSpoolSummary *new = (CamelSpoolSummary *)camel_object_new(camel_spool_summary_get_type());
((CamelFolderSummary *)new)->folder = folder;
-
+ if (folder) {
+ /* Set the functions for db sorting */
+ /* FIXME: Add column names though a #define */
+ camel_db_set_collate (folder->cdb, "bdata", "frompos_sort", (CamelDBCollate)frompos_sort);
+ }
camel_local_summary_construct((CamelLocalSummary *)new, NULL, mbox_name, NULL);
camel_folder_summary_load_from_db ((CamelFolderSummary *)new, NULL);
return new;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]