aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-filter-search.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@gnu.org>2001-04-14 06:08:03 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-04-14 06:08:03 +0800
commit0eb8afc1d0cfa27d020a4191f44e400c714d190c (patch)
treeb3629148572fa1f1ee1982e8359faed15245d74b /camel/camel-filter-search.c
parent546128c8d99b1edd859ba5d8b57549550b910a1d (diff)
downloadgsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.gz
gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.zst
gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.zip
Make the (previously unused) get-source command actually do the right
2001-04-13 Jon Trowbridge <trow@gnu.org> * camel-filter-search.c (get_source): Make the (previously unused) get-source command actually do the right thing, properly shrouding any passed-in source and falling back to use the source attached to the mime message. 2001-04-13 Jon Trowbridge <trow@gnu.org> * filtertypes.xml: Add XML specs for source account filtering. * filter-element.c (filter_element_new_type_name): Recognize type "source", construct a FilterSource. * filter-source.c: Added. A FilterElement for the account e-mail comes from. svn path=/trunk/; revision=9304
Diffstat (limited to 'camel/camel-filter-search.c')
-rw-r--r--camel/camel-filter-search.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 15e8eb77f2..78f4ee7b4c 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -35,6 +35,7 @@
#include <ctype.h>
#include "e-util/e-sexp.h"
+#include "e-util/e-url.h"
#include "camel-mime-message.h"
#include "camel-filter-search.h"
@@ -397,13 +398,20 @@ get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessag
ESExpResult *r;
r = e_sexp_result_new(f, ESEXP_RES_STRING);
- r->value.string = g_strdup (fms->source);
+ if (fms->source) {
+ r->value.string = e_url_shroud (fms->source);
+ } else {
+ r->value.string = camel_mime_message_get_source (fms->message);
+ }
+
+ g_message ("got source: [%s]", r->value.string);
return r;
}
-gboolean camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info,
- const char *source, const char *expression, CamelException *ex)
+gboolean
+camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info,
+ const char *source, const char *expression, CamelException *ex)
{
FilterMessageSearch fms;
ESExp *sexp;
@@ -452,3 +460,6 @@ error:
e_sexp_unref(sexp);
return FALSE;
}
+
+
+