evolution-data-server r9079 - in branches/camel-db-summary/camel: . providers/local
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9079 - in branches/camel-db-summary/camel: . providers/local
- Date: Wed, 2 Jul 2008 06:38:26 +0000 (UTC)
Author: sragavan
Date: Wed Jul 2 06:38:26 2008
New Revision: 9079
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9079&view=rev
Log:
Fix vfolders to use awesome search impr by sankar.
Modified:
branches/camel-db-summary/camel/camel-db.c
branches/camel-db-summary/camel/camel-folder-search.c
branches/camel-db-summary/camel/camel-folder-summary.c
branches/camel-db-summary/camel/camel-vee-folder.c
branches/camel-db-summary/camel/providers/local/camel-mbox-store.c
Modified: branches/camel-db-summary/camel/camel-db.c
==============================================================================
--- branches/camel-db-summary/camel/camel-db.c (original)
+++ branches/camel-db-summary/camel/camel-db.c Wed Jul 2 06:38:26 2008
@@ -454,7 +454,6 @@
array = g_ptr_array_new ();
camel_db_select (db, sel_query, read_uids_callback, array, ex);
sqlite3_free (sel_query);
- g_print ("result = %d\n", array->len);
/* We make sure to return NULL if we don't get anything. Be good to your caller */
if (!array->len) {
g_ptr_array_free (array, TRUE);
Modified: branches/camel-db-summary/camel/camel-folder-search.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-search.c (original)
+++ branches/camel-db-summary/camel/camel-folder-search.c Wed Jul 2 06:38:26 2008
@@ -499,7 +499,7 @@
}
d(printf ("\nsexp is : [%s]\n", expr));
- printf ("\nSomething is returned in the top-level caller : [%s]\n", search->query->str);
+ printf ("Something is returned in the top-level caller : [%s]\n", search->query->str);
matches = g_ptr_array_new();
cdb = (CamelDB *) (search->folder->cdb);
Modified: branches/camel-db-summary/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.c (original)
+++ branches/camel-db-summary/camel/camel-folder-summary.c Wed Jul 2 06:38:26 2008
@@ -65,7 +65,7 @@
/* To switch between e-memchunk and g-alloc */
#define ALWAYS_ALLOC 1
#define USE_GSLICE 1
-#define SUMMARY_CACHE_DROP 180
+#define SUMMARY_CACHE_DROP 180
static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
/* this lock is ONLY for the standalone messageinfo stuff */
@@ -714,7 +714,7 @@
struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
/* Attempt to release 2MB*/
- sqlite3_release_memory(CAMEL_DB_FREE_CACHE_SIZE);
+ /* sqlite3_release_memory(CAMEL_DB_FREE_CACHE_SIZE); */
if (time(NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
return TRUE;
Modified: branches/camel-db-summary/camel/camel-vee-folder.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-folder.c (original)
+++ branches/camel-db-summary/camel/camel-vee-folder.c Wed Jul 2 06:38:26 2008
@@ -578,41 +578,43 @@
-/* if (vf != folder_unmatched) */
-/* expr = g_strdup_printf ("(and %s %s)", vf->expression ? vf->expression : "", expression); */
-/* else */
-/* expr = g_strdup (expression); */
-
-/* node = p->folders; */
-/* while (node) { */
-/* CamelFolder *f = node->data; */
-/* int i; */
-/* char hash[8]; */
+ if (vf != folder_unmatched)
+ expr = g_strdup_printf ("(and %s %s)", vf->expression ? vf->expression : "", expression);
+ else
+ expr = g_strdup (expression);
+
+ node = p->folders;
+ while (node) {
+ CamelFolder *f = node->data;
+ int i;
+ char hash[8];
-/* /\* make sure we only search each folder once - for unmatched folder to work right *\/ */
-/* if (g_hash_table_lookup(searched, f) == NULL) { */
-/* camel_vee_folder_hash_folder(f, hash); */
-/* /\* FIXME: shouldn't ignore search exception *\/ */
-/* matches = camel_folder_search_by_expression(f, expr, NULL); */
-/* if (matches) { */
-/* for (i = 0; i < matches->len; i++) { */
-/* char *uid = matches->pdata[i], *vuid; */
-
-/* vuid = g_malloc(strlen(uid)+9); */
-/* memcpy(vuid, hash, 8); */
-/* strcpy(vuid+8, uid); */
-/* g_ptr_array_add(result, vuid); */
-/* } */
-/* camel_folder_search_free(f, matches); */
-/* } */
-/* g_hash_table_insert(searched, f, f); */
-/* } */
-/* node = g_list_next(node); */
-/* } */
+ /* make sure we only search each folder once - for unmatched folder to work right */
+ if (g_hash_table_lookup(searched, f) == NULL) {
+ camel_vee_folder_hash_folder(f, hash);
+ /* FIXME: shouldn't ignore search exception */
+ matches = camel_folder_search_by_expression(f, expr, NULL);
+ if (matches) {
+ for (i = 0; i < matches->len; i++) {
+ char *uid = matches->pdata[i], *vuid;
+
+ vuid = g_malloc(strlen(uid)+9);
+ memcpy(vuid, hash, 8);
+ strcpy(vuid+8, uid);
+ g_ptr_array_add(result, camel_pstring_strdup(vuid));
+ g_free (vuid);
+ }
+ camel_folder_search_free(f, matches);
+ }
+ g_hash_table_insert(searched, f, f);
+ }
+ node = g_list_next(node);
+ }
-/* g_free(expr); */
+ g_free(expr);
+ if (0)
{
GHashTable *hashes = g_hash_table_new (g_str_hash, g_str_equal);
GPtrArray *subids = g_ptr_array_new ();
Modified: branches/camel-db-summary/camel/providers/local/camel-mbox-store.c
==============================================================================
--- branches/camel-db-summary/camel/providers/local/camel-mbox-store.c (original)
+++ branches/camel-db-summary/camel/providers/local/camel-mbox-store.c Wed Jul 2 06:38:26 2008
@@ -101,7 +101,7 @@
}
static char *extensions[] = {
- ".msf", ".ev-summary", ".ev-summary-meta", ".ibex.index", ".ibex.index.data", ".cmeta", ".lock"
+ ".msf", ".ev-summary", ".ev-summary-meta", ".ibex.index", ".ibex.index.data", ".cmeta", ".lock", ".db"
};
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]