diff options
author | Jon Trowbridge <trow@gnu.org> | 2001-04-14 06:08:03 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-04-14 06:08:03 +0800 |
commit | 0eb8afc1d0cfa27d020a4191f44e400c714d190c (patch) | |
tree | b3629148572fa1f1ee1982e8359faed15245d74b /camel | |
parent | 546128c8d99b1edd859ba5d8b57549550b910a1d (diff) | |
download | gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.gz gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.bz2 gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.lz gsoc2013-evolution-0eb8afc1d0cfa27d020a4191f44e400c714d190c.tar.xz 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')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 17 | ||||
-rw-r--r-- | camel/camel-internet-address.c | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7b2d2fa8d3..8e8d303b82 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +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 Dan Winship <danw@ximian.com> * camel-object.c (camel_object_hook_event): 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; } + + + diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c index 416451b27d..902178c303 100644 --- a/camel/camel-internet-address.c +++ b/camel/camel-internet-address.c @@ -24,7 +24,7 @@ #include "camel-mime-utils.h" #include "camel-internet-address.h" -#define d(x) +#define d(x) static int internet_decode (CamelAddress *, const char *raw); static char * internet_encode (CamelAddress *); |