diff options
Diffstat (limited to 'camel/camel-filter-search.c')
-rw-r--r-- | camel/camel-filter-search.c | 13 |
1 files changed, 13 insertions, 0 deletions
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) { |