aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.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-callbacks.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-callbacks.c')
-rw-r--r--mail/mail-callbacks.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 2156145d59..33b44c1c6c 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -525,7 +525,7 @@ filter_edit (BonoboUIHandler *uih, void *user_data, const char *path)
fc = filter_context_new();
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
- rule_context_load ((RuleContext *)fc, system, user);
+ rule_context_load ((RuleContext *)fc, system, user, NULL, NULL);
g_free (user);
g_free (system);
@@ -634,4 +634,21 @@ edit_message (BonoboUIHandler *uih, void *user_data, const char *path)
edit_msg (NULL, user_data);
}
+void
+run_filter_ondemand (BonoboUIHandler *uih, gpointer user_data, const char *path)
+{
+ struct fb_ondemand_closure *oc = (struct fb_ondemand_closure *) user_data;
+ FilterDriver *d;
+
+ if (oc->fb->folder == NULL)
+ return;
+
+ printf ("Running filter \"%s\"\n", oc->rule->name);
+ d = filter_driver_new (oc->fb->filter_context,
+ mail_tool_filter_get_folder_func,
+ NULL);
+ filter_driver_run (d, oc->fb->folder, oc->fb->folder,
+ FILTER_SOURCE_DEMAND, TRUE,
+ NULL, NULL);
+}