aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
authorSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-07-16 19:41:04 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-07-16 19:41:04 +0800
commit40085e043615d8f1cdb583d014d774724e15d9b3 (patch)
treeea75e83804708b0c14210bfef2758e8658828087 /mail/em-folder-browser.c
parentc049cedd6969d77649db15b71f4ba112d4a2c065 (diff)
downloadgsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar.gz
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar.bz2
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar.lz
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar.xz
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.tar.zst
gsoc2013-evolution-40085e043615d8f1cdb583d014d774724e15d9b3.zip
Pushing changes from the madagascar branch related to the on-disk
summary work. svn path=/trunk/; revision=35747
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index ce17ea2f54..6c4e959e02 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -873,11 +873,15 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
view_sexp = " ";
break;
+ /* README: All the sexp below are not rocket science but it is not straightforward as well.
+ I believe it is better to document the assumptions and the conventions followed for the sexp,
+ before I forget so that no one else again needs to read through the code -- Sankar */
+
case VIEW_UNREAD_MESSAGES:
- view_sexp = "(match-all (not (system-flag \"Seen\")))";
+ view_sexp = "(match-all (system-flag \"Seen\"))";
break;
case VIEW_READ_MESSAGES:
- view_sexp = "(match-all (system-flag \"Seen\"))";
+ view_sexp = "(match-all (system-flag \"Seen\" \"set\"))";
break;
case VIEW_RECENT_MESSAGES:
if (!em_utils_folder_is_sent (folder, folder_uri))
@@ -892,10 +896,10 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
view_sexp = " (match-all (> (get-sent-date) (- (get-current-date) 432000)))";
break;
case VIEW_WITH_ATTACHMENTS:
- view_sexp = "(match-all (system-flag \"Attachments\"))";
+ view_sexp = "(match-all (system-flag \"Attachments\" \"set\"))";
break;
case VIEW_NOT_JUNK:
- view_sexp = "(match-all (not (system-flag \"junk\")))";
+ view_sexp = "(match-all (system-flag \"junk\"))";
break;
case VIEW_NO_LABEL: {
GSList *l;
@@ -911,6 +915,8 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
tag += 6;
g_string_append_printf (s, " (match-all (not (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\"))))", tag, tag, tag);
+ /* FIXME: I dont see a way of mapping this kind of sexp into sql atm. I guess this option could be kicked out */
+ /* May be we should copy what I did for system flags -- Sankar */
}
}
@@ -921,11 +927,11 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
} break;
case VIEW_LABEL:
tag = (char *)g_object_get_data (G_OBJECT (menu_item), "LabelTag");
- view_sexp = g_strdup_printf ("(match-all (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\")))", tag, tag, tag);
+ view_sexp = g_strdup_printf ("(match-all (and (and (user-tag \"label\" \"%s\")) (or (user-flag \"$Label%s\")) (or (user-flag \"%s\"))))", tag, tag, tag);
duplicate = FALSE;
break;
case VIEW_MESSAGES_MARKED_AS_IMPORTANT:
- view_sexp = "(match-all (system-flag \"Flagged\"))";
+ view_sexp = "(match-all (system-flag \"Flagged\" \"set\"))";
break;
case VIEW_ANY_FIELD_CONTAINS:
break;