aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
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')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-filter-editor.c5
-rw-r--r--mail/mail-session.c4
3 files changed, 17 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fa13c0f0a4..5a1331c77c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2008-06-09 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #201011
+
+ * em-filter-editor.c: (em_filter_editor_construct):
+ Show Enabled column in the editor, because we support it here.
+ * mail-session.c: (main_get_filter_driver): Skip disabled rules.
+
+2008-06-09 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #536772
* em-folder-browser.c: (EMFolderViewEnable emfb_enable_map):
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 599d5674e1..20bf0836bc 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -137,6 +137,7 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
{
GtkWidget *menu, *item, *omenu;
int i;
+ GtkTreeViewColumn *column;
omenu = glade_xml_get_widget (gui, "filter_source");
gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu));
@@ -153,6 +154,10 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
gtk_widget_show (omenu);
rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules"));
+
+ /* Show the Enabled column, we support it here */
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (RULE_EDITOR (fe)->list), 0);
+ gtk_tree_view_column_set_visible (column, TRUE);
}
static FilterRule *
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);