aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-filter-search.c13
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)
{