[evolution-data-server/gnome-3-2] Bug #659438 - Checks junk in all folders despite restricting to INBOX



commit b40ba4b344dc7468a3d1ee0c0788f6b22e6b5d9b
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 26 12:19:30 2011 +0200

    Bug #659438 - Checks junk in all folders despite restricting to INBOX

 camel/providers/imap/camel-imap-folder.c   |    5 ++++-
 camel/providers/imap/camel-imap-provider.c |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index cc3d0c6..833edd6 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -442,6 +442,7 @@ camel_imap_folder_new (CamelStore *parent,
 		const gchar *junk_path;
 		const gchar *trash_path;
 		gboolean filter_junk;
+		gboolean filter_junk_inbox;
 		gboolean folder_is_junk;
 		gboolean folder_is_trash;
 
@@ -464,8 +465,10 @@ camel_imap_folder_new (CamelStore *parent,
 
 		filter_junk = camel_imap_settings_get_filter_junk (
 			CAMEL_IMAP_SETTINGS (settings));
+		filter_junk_inbox = camel_imap_settings_get_filter_junk_inbox (
+			CAMEL_IMAP_SETTINGS (settings));
 
-		if (filter_junk)
+		if (filter_junk && !filter_junk_inbox)
 			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
 
 		folder_is_trash =
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index cb8278c..a1d0cc2 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -66,7 +66,7 @@ static CamelProviderConfEntry imap_conf_entries[] = {
 	  N_("_Apply filters to new messages in Inbox on this server"), "1" },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-junk", NULL,
 	  N_("Check new messages for Jun_k contents"), "0" },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-junk-inbox", "filter_junk",
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-junk-inbox", "filter-junk",
 	  N_("Only check for Junk messages in the IN_BOX folder"), "0" },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "stay-synchronized", NULL,
 	  N_("Automatically synchroni_ze remote mail locally"), "0" },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]