evolution-data-server r9121 - branches/camel-db-summary/camel
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9121 - branches/camel-db-summary/camel
- Date: Mon, 14 Jul 2008 17:35:52 +0000 (UTC)
Author: psankar
Date: Mon Jul 14 17:35:52 2008
New Revision: 9121
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9121&view=rev
Log:
More search goodness. At last most of the useful quickshow options work
along with hide-deleted etc.
Modified:
branches/camel-db-summary/camel/camel-db.c
branches/camel-db-summary/camel/camel-folder-search.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 Mon Jul 14 17:35:52 2008
@@ -934,6 +934,16 @@
return g_strdup ("mail_cc");
else if (!g_ascii_strcasecmp (raw_name, "To"))
return g_strdup ("mail_to");
+ else if (!g_ascii_strcasecmp (raw_name, "Flagged"))
+ return g_strdup ("important");
+ else if (!g_ascii_strcasecmp (raw_name, "deleted"))
+ return g_strdup ("deleted");
+ else if (!g_ascii_strcasecmp (raw_name, "junk"))
+ return g_strdup ("junk");
+ else if (!g_ascii_strcasecmp (raw_name, "Seen"))
+ return g_strdup ("read");
+ else if (!g_ascii_strcasecmp (raw_name, "Attachments"))
+ return g_strdup ("attachment");
else {
/* Let it crash for all unknown columns for now.
We need to load the messages into memory and search etc.
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 Mon Jul 14 17:35:52 2008
@@ -1370,19 +1370,26 @@
r->value.bool = truth;
} else {
/* FIXME: You need to complete the camel-db.c:camel_db_get_column_name function and use those return values */
- char * value = argv[0]->value.string;
+ char * value = camel_db_get_column_name (argv[0]->value.string);
+ char *connector = "=";
+
+ if (argc > 1) {
+ if (! strcmp(argv[1]->value.string, "set") )
+ connector = "!=";
+ }
if (g_str_has_suffix (search->query->str, " "))
- g_string_append_printf (search->query, "WHERE (%s = 0)", value);
+ g_string_append_printf (search->query, "WHERE (%s %s 0)", value, connector);
else {
-
search->query->len -= 1;
if (f->operators)
- g_string_append_printf (search->query, " %s %s = 0)", (char *) (g_slist_nth_data (f->operators, 0)), value);
+ g_string_append_printf (search->query, " %s %s %s 0)", (char *) (g_slist_nth_data (f->operators, 0)), value, connector);
else
- g_string_append_printf (search->query, " OR %s = 0", value);
+ g_string_append_printf (search->query, " OR %s %s 0", value, connector);
}
+ g_free (value);
+
r = e_sexp_result_new(f, ESEXP_RES_BOOL);
r->value.bool = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]