diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-24 10:53:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-24 10:53:01 +0800 |
commit | 0887fc650f5b6f37cbbaa84d3edd121fd83ba85d (patch) | |
tree | 3d057dcf550ab7642327d483ef63e332e66fc4d4 /mail/mail-autofilter.c | |
parent | 04780422995146b73e64c37ad79f42516c77d52e (diff) | |
download | gsoc2013-evolution-0887fc650f5b6f37cbbaa84d3edd121fd83ba85d.tar.gz gsoc2013-evolution-0887fc650f5b6f37cbbaa84d3edd121fd83ba85d.tar.zst gsoc2013-evolution-0887fc650f5b6f37cbbaa84d3edd121fd83ba85d.zip |
Apply outgoing filters to the message.
2000-10-23 Jeffrey Stedfast <fejj@helixcode.com>
* mail-ops.c (do_send_mail): Apply outgoing filters to the
message.
svn path=/trunk/; revision=6140
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r-- | mail/mail-autofilter.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 4070f5fc4e..22b506d683 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -269,26 +269,25 @@ filter_rule_from_message(FilterContext *context, CamelMimeMessage *msg, int flag } void -filter_gui_add_from_message(CamelMimeMessage *msg, int flags) +filter_gui_add_from_message (CamelMimeMessage *msg, int flags) { FilterContext *fc; char *userrules, *systemrules; FilterRule *rule; extern char *evolution_dir; - - fc = filter_context_new(); - userrules = g_strdup_printf("%s/filters.xml", evolution_dir); - systemrules = g_strdup_printf("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR); - rule_context_load((RuleContext *)fc, systemrules, userrules); - rule = filter_rule_from_message(fc, msg, flags); - /* FIXME: with demand filters being abandoned, do we still care about source? */ + fc = filter_context_new (); + userrules = g_strdup_printf ("%s/filters.xml", evolution_dir); + systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR); + rule_context_load ((RuleContext *)fc, systemrules, userrules); + rule = filter_rule_from_message (fc, msg, flags); + filter_rule_set_source (rule, FILTER_SOURCE_INCOMING); - rule_context_add_rule_gui((RuleContext *)fc, rule, _("Add Filter Rule"), userrules); + rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), userrules); g_free (userrules); g_free (systemrules); - gtk_object_unref((GtkObject *)fc); + gtk_object_unref (GTK_OBJECT (fc)); } void |