diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-12-02 12:01:53 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-12-02 12:01:53 +0800 |
commit | e7c8c694a76a27b29056465d25347276db24519f (patch) | |
tree | 9d92e199b464ed0dcd9c014eacd0a98573194a7d /filter/filter-message-search.c | |
parent | 787d1833c052cc1acf54a1d7fae5c350bdec4f94 (diff) | |
download | gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar.gz gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar.bz2 gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar.lz gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar.xz gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.tar.zst gsoc2013-evolution-e7c8c694a76a27b29056465d25347276db24519f.zip |
Added support for the system-flag type.
2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
* filter-element.c (filter_element_new_type_name): Added support
for the system-flag type.
* Makefile.am: Added filter-system-flag.[c,h].
* filter-system-flag.[c,h]: New type for system flags.
* filtertypes.xml: Oops, looks like we were still using integers
as arguments to set-flag. Change over to using strings which are
safer and also change the name to set-system-flag.
* filter-driver.c (do_flag): Use strings instead of integers.
Instead of set-flag, the callback is now set-system-flag for less
confusion. Sorry Ettore, but you'll have to change your filters.
* filtertypes.xml: Added system-flags stuff.
* vfoldertypes.xml: And here too.
* filter-message-search.c (system_flag): New ESExp callback for
filtering on system flags.
svn path=/trunk/; revision=6764
Diffstat (limited to 'filter/filter-message-search.c')
-rw-r--r-- | filter/filter-message-search.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/filter/filter-message-search.c b/filter/filter-message-search.c index d374422dfd..b949fbd372 100644 --- a/filter/filter-message-search.c +++ b/filter/filter-message-search.c @@ -47,6 +47,7 @@ static ESExpResult *body_contains (struct _ESExp *f, int argc, struct _ESExpResu static ESExpResult *body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); +static ESExpResult *system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); @@ -73,6 +74,7 @@ static struct { { "header-full-regex", (ESExpFunc *) header_full_regex, 0 }, { "user-tag", (ESExpFunc *) user_tag, 0 }, { "user-flag", (ESExpFunc *) user_flag, 0 }, + { "system-flag", (ESExpFunc *) system_flag, 0 }, { "get-sent-date", (ESExpFunc *) get_sent_date, 0 }, { "get-received-date", (ESExpFunc *) get_received_date, 0 }, { "get-current-date", (ESExpFunc *) get_current_date, 0 }, @@ -664,6 +666,21 @@ user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessage } static ESExpResult * +system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) +{ + ESExpResult *r; + gboolean truth = FALSE; + + if (argc == 1) + truth = camel_system_flag_get (fms->info->flags, argv[0]->value.string); + + r = e_sexp_result_new (ESEXP_RES_BOOL); + r->value.bool = truth; + + return r; +} + +static ESExpResult * user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { ESExpResult *r; |