diff options
Diffstat (limited to 'camel/camel-folder-search.c')
-rw-r--r-- | camel/camel-folder-search.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c index 51597ee0c7..db7e6076fe 100644 --- a/camel/camel-folder-search.c +++ b/camel/camel-folder-search.c @@ -35,8 +35,6 @@ #include <glib.h> -#include "libedataserver/e-memory.h" - #include "camel-folder-search.h" #include "camel-folder-thread.h" @@ -45,8 +43,8 @@ #include "camel-multipart.h" #include "camel-mime-message.h" #include "camel-stream-mem.h" +#include "e-util/e-memory.h" #include "camel-search-private.h" -#include "camel-i18n.h" #define d(x) #define r(x) @@ -862,7 +860,7 @@ check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolder header = camel_message_info_subject(search->current); } else if (!strcasecmp(headername, "date")) { /* FIXME: not a very useful form of the date */ - sprintf(strbuf, "%d", (int)camel_message_info_date_sent(search->current)); + sprintf(strbuf, "%d", (int)search->current->date_sent); header = strbuf; } else if (!strcasecmp(headername, "from")) { header = camel_message_info_from(search->current); @@ -1248,7 +1246,7 @@ search_user_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFo /* performs an OR of all words */ for (i=0;i<argc && !truth;i++) { if (argv[i]->type == ESEXP_RES_STRING - && camel_message_info_user_flag(search->current, argv[i]->value.string)) { + && camel_flag_get(&search->current->user_flags, argv[i]->value.string)) { truth = TRUE; break; } @@ -1274,7 +1272,7 @@ search_system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, Came gboolean truth = FALSE; if (argc == 1) - truth = camel_system_flag_get (camel_message_info_flags(search->current), argv[0]->value.string); + truth = camel_system_flag_get (search->current->flags, argv[0]->value.string); r = e_sexp_result_new(f, ESEXP_RES_BOOL); r->value.bool = truth; @@ -1295,7 +1293,7 @@ search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFol r(printf("executing user-tag\n")); if (argc == 1) - value = camel_message_info_user_tag(search->current, argv[0]->value.string); + value = camel_tag_get (&search->current->user_tags, argv[0]->value.string); r = e_sexp_result_new(f, ESEXP_RES_STRING); r->value.string = g_strdup (value ? value : ""); @@ -1314,7 +1312,7 @@ search_get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, Cam if (s->current) { r = e_sexp_result_new(f, ESEXP_RES_INT); - r->value.number = camel_message_info_date_sent(s->current); + r->value.number = s->current->date_sent; } else { r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR); r->value.ptrarray = g_ptr_array_new (); @@ -1334,7 +1332,7 @@ search_get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, if (s->current) { r = e_sexp_result_new(f, ESEXP_RES_INT); - r->value.number = camel_message_info_date_received(s->current); + r->value.number = s->current->date_received; } else { r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR); r->value.ptrarray = g_ptr_array_new (); @@ -1365,7 +1363,7 @@ search_get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFo /* are we inside a match-all? */ if (s->current) { r = e_sexp_result_new (f, ESEXP_RES_INT); - r->value.number = camel_message_info_size(s->current) / 1024; + r->value.number = s->current->size / 1024; } else { r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR); r->value.ptrarray = g_ptr_array_new (); |