diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-05-17 04:03:57 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-05-17 04:03:57 +0800 |
commit | 03c399c656ca3cc0d206d15e2f0d217f045d3ee2 (patch) | |
tree | 78eeb82770c1bb9fe162d6a6355085fdb4182288 /camel | |
parent | 7cd27bf6a49c4b63bf95716a07c47f5cd9ce71df (diff) | |
download | gsoc2013-evolution-03c399c656ca3cc0d206d15e2f0d217f045d3ee2.tar.gz gsoc2013-evolution-03c399c656ca3cc0d206d15e2f0d217f045d3ee2.tar.zst gsoc2013-evolution-03c399c656ca3cc0d206d15e2f0d217f045d3ee2.zip |
New e-sexp callback function to get a user_tag label value.
2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-search.c (get_label): New e-sexp callback function
to get a user_tag label value.
svn path=/trunk/; revision=16937
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7bfa274cb8..b25215bd99 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2002-05-16 Jeffrey Stedfast <fejj@ximian.com> + + * camel-filter-search.c (get_label): New e-sexp callback function + to get a user_tag label value. + 2002-05-15 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index 02362b7e2b..dd47bf386e 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -94,6 +94,7 @@ static ESExpResult *get_score (struct _ESExp *f, int argc, struct _ESExpResult * static ESExpResult *get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); static ESExpResult *shell_exec (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); +static ESExpResult *get_label (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms); /* builtin functions */ static struct { @@ -123,6 +124,7 @@ static struct { { "get-source", (ESExpFunc *) get_source, 0 }, { "get-size", (ESExpFunc *) get_size, 0 }, { "shell-exec", (ESExpFunc *) shell_exec, 0 }, + { "get-label", (ESExpFunc *) get_label, 0 }, }; @@ -511,6 +513,17 @@ get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageS return r; } +static ESExpResult * +get_label (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) +{ + ESExpResult *r; + + r = e_sexp_result_new (f, ESEXP_RES_INT); + r->value.number = atoi (camel_tag_get (&fms->info->user_tags, "label")); + + return r; +} + static int run_command (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { |