aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-session.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-06-09 18:50:54 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-06-09 18:50:54 +0800
commitf1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967 (patch)
treeefb82364d33cceaa2a990582de1b1c3b4b652fc7 /mail/mail-session.c
parent7d4f83689a512f3af1a4002a1567ffbb2762ebb9 (diff)
downloadgsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar.gz
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar.bz2
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar.lz
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar.xz
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.tar.zst
gsoc2013-evolution-f1cfc8c031380ebd6f4c5fcd681ba1cc4e77f967.zip
** Fix for bug #201011
2008-06-09 Milan Crha <mcrha@redhat.com> ** Fix for bug #201011 * filter/filter-rule.h: (struct _FilterRule): New property 'enabled' to be able to disable filter rules. * filter/filter-rule.c: (filter_rule_init), (rule_eq), (xml_encode), (xml_decode), (rule_copy): Store/restore/use 'enabled' value. * filter/rule-editor.c: (add_editor_response), (rule_move), (set_source): Set the 'enabled' column properly. * filter/rule-editor.c: (rule_able_toggled), (rule_editor_treeview_new): Add column "Enabled" to the tree, but have it hidden by default, only those whom supports it can show it. * mail/em-filter-editor.c: (em_filter_editor_construct): Show Enabled column in the editor, because we support it here. * mail/mail-session.c: (main_get_filter_driver): Skip disabled rules. svn path=/trunk/; revision=35620
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r--mail/mail-session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 0a8af8e023..a371101946 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -548,6 +548,10 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
g_string_truncate (fsearch, 0);
g_string_truncate (faction, 0);
+ /* skip disabled rules */
+ if (!rule->enabled)
+ continue;
+
filter_rule_build_code (rule, fsearch);
em_filter_rule_build_action ((EMFilterRule *) rule, faction);
camel_filter_driver_add_rule (driver, rule->name, fsearch->str, faction->str);