aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-18 01:42:21 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-18 01:42:21 +0800
commit7cf30eb79276d4f255c1d603e2c203bb054cf50e (patch)
tree687a003be1d0fbcc0ff06eccd900a04c38ad7aa0 /mail/mail-tools.c
parentb3f1da4f99afadb51862fe732d66b72437224b99 (diff)
downloadgsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar.gz
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar.bz2
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar.lz
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar.xz
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.tar.zst
gsoc2013-evolution-7cf30eb79276d4f255c1d603e2c203bb054cf50e.zip
Filtering on demand! booyeah!
svn path=/trunk/; revision=4864
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 18996ed946..2d10411f91 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -487,7 +487,8 @@ mail_tool_fetch_mail_into_searchable (const char *source_url, gboolean keep_on_s
return search_folder;
}
-static CamelFolder *get_folder_func (FilterDriver *d, const char *uri, void *data)
+CamelFolder *
+mail_tool_filter_get_folder_func (FilterDriver *d, const char *uri, void *data)
{
return mail_tool_uri_to_folder_noex (uri);
}
@@ -506,17 +507,18 @@ mail_tool_filter_contents_into (CamelFolder *source, CamelFolder *dest,
userrules = g_strdup_printf ("%s/filters.xml", evolution_dir);
systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
fc = filter_context_new();
- rule_context_load ((RuleContext *)fc, systemrules, userrules);
+ rule_context_load ((RuleContext *)fc, systemrules, userrules, NULL, NULL);
g_free (userrules);
g_free (systemrules);
- filter = filter_driver_new (fc, get_folder_func, 0);
+ filter = filter_driver_new (fc, mail_tool_filter_get_folder_func, 0);
if (hook_func)
camel_object_hook_event (CAMEL_OBJECT (dest), "folder_changed",
hook_func, hook_data);
- filter_driver_run (filter, source, dest, TRUE, hook_func, hook_data);
+ filter_driver_run (filter, source, dest, FILTER_SOURCE_INCOMING,
+ TRUE, hook_func, hook_data);
camel_folder_sync (CAMEL_FOLDER (source), TRUE, ex);
camel_folder_sync (CAMEL_FOLDER (dest), TRUE, ex);