[evolution-patches] IMAP junk changes



I know we're still waiting on UI/jpr approval for this changes, but
here's the patch that implements the imap junk stuff I suggested
earlier.

(i'd show you a screenshot but addressbook is stopping me:
evolution-1.5: relocation error: /opt/gnome2/lib/evolution/1.5/
components/libevolution-addressbook.so: undefined symbol:
certificate_manager_config_control_new)

Basically it moves the "dont check messages on imap" option to be a
recieve option on the imap server itself.  And it adds a 'only inbox'
option too.

The only problem - you have to turn on junk filtering in global options
separately to the junk option on each server, before it takes effect.

With a few more lines of code it could be a per-folder option too.


Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2024
diff -u -3 -r1.2024 ChangeLog
--- camel/ChangeLog	25 Feb 2004 20:11:06 -0000	1.2024
+++ camel/ChangeLog	26 Feb 2004 07:35:37 -0000
@@ -1,3 +1,31 @@
+2004-02-26  Not Zed  <NotZed Ximian com>
+
+	* providers/imap/camel-imap-utils.c (imap_parse_flag_list): use
+	g_ascii_strcasecmp, and handle USER flags option.
+
+	* camel-session.c (camel_session_check_junk_for_imap) 
+	(camel_session_set_check_junk_for_imap): removed.
+
+	* providers/imap/camel-imap-provider.c: Add filter_junk and
+	filter_junk_inbox options to the receive option page.
+
+	* providers/imap/camel-imap-store.c (imap_setv, imap_getv): handle
+	FILTER_JUNK and FILTER_JUNK_INBOX parameters.
+	(imap_setv): conver to switch rather than if statement.
+	(construct): handle url args for filter_junk and
+	filter_junk_inbox.
+
+	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Set
+	the folder's flags based on the stores junk settings.
+	(imap_update_summary): remove the test for
+	session_check_junk_for_imap, its handled per-store now.
+
+	* camel-folder.c (folder_changed): only check for FILTER_RECENT or
+	FILTER_JUNK to see if we need to do filtering.
+
+	* camel-folder.h (CAMEL_FOLDER_FILTER_JUNK): renamed from
+	CAMEL_FOLDER_SUPRESS_JUNK_TEST (and obviously inverted logic).
+
 2004-02-25  Jeffrey Stedfast  <fejj ximian com>
 
 	* camel-filter-driver.c (camel_filter_driver_filter_folder): Free
Index: camel/camel-filter-search.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-filter-search.c,v
retrieving revision 1.42
diff -u -3 -r1.42 camel-filter-search.c
--- camel/camel-filter-search.c	25 Feb 2004 03:47:02 -0000	1.42
+++ camel/camel-filter-search.c	26 Feb 2004 07:35:37 -0000
@@ -610,12 +610,13 @@
 {
 	ESExpResult *r;
 	gboolean retval = FALSE;
-	
+
 	if (fms->session->junk_plugin != NULL) {
 		retval = camel_junk_plugin_check_junk (fms->session->junk_plugin, camel_filter_search_get_message (fms, f));
-	
+		
 		printf("junk filter => %s\n", retval ? "*JUNK*" : "clean");
 	}
+
 	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.number = retval;
 
Index: camel/camel-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder.c,v
retrieving revision 1.185
diff -u -3 -r1.185 camel-folder.c
--- camel/camel-folder.c	25 Feb 2004 18:54:13 -0000	1.185
+++ camel/camel-folder.c	26 Feb 2004 07:35:38 -0000
@@ -1647,7 +1647,7 @@
 		CamelSession *session = ((CamelService *)folder->parent_store)->session;
 		CamelFilterDriver *driver = NULL;
 
-		if (((folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) || (camel_session_check_junk (session) && !(folder->folder_flags & CAMEL_FOLDER_SUPRESS_JUNK_TEST)))
+		if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT|CAMEL_FOLDER_FILTER_JUNK))
 		    && changed->uid_recent->len > 0)
 			driver = camel_session_get_filter_driver(session,
 								 (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) ? FILTER_SOURCE_INCOMING : FILTER_SOURCE_JUNKTEST, NULL);
Index: camel/camel-folder.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder.h,v
retrieving revision 1.119
diff -u -3 -r1.119 camel-folder.h
--- camel/camel-folder.h	6 Feb 2004 06:30:58 -0000	1.119
+++ camel/camel-folder.h	26 Feb 2004 07:35:38 -0000
@@ -104,7 +104,7 @@
 #define CAMEL_FOLDER_HAS_BEEN_DELETED       (1<<3)
 #define CAMEL_FOLDER_IS_TRASH               (1<<4)
 #define CAMEL_FOLDER_IS_JUNK                (1<<5)
-#define CAMEL_FOLDER_SUPRESS_JUNK_TEST      (1<<6)
+#define CAMEL_FOLDER_FILTER_JUNK  	    (1<<6)
 
 typedef struct {
 	CamelObjectClass parent_class;
Index: camel/camel-session.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-session.c,v
retrieving revision 1.104
diff -u -3 -r1.104 camel-session.c
--- camel/camel-session.c	19 Feb 2004 07:27:35 -0000	1.104
+++ camel/camel-session.c	26 Feb 2004 07:35:38 -0000
@@ -662,32 +662,3 @@
 
 	session->check_junk = check_junk;
 }
-
-/**
- * camel_session_check_junk_for_imap
- * @session: 
- * 
- * Do we have to check IMAP incoming messages to be junk?
- **/
-gboolean
-camel_session_check_junk_for_imap (CamelSession *session)
-{
-	g_assert(CAMEL_IS_SESSION(session));
-
-	return session->check_junk_for_imap;
-}
-
-/**
- * camel_session_set_check_junk_for_imap:
- * @session: 
- * @check_junk_for_imap: 
- * 
- * Set check_junk_for_imap flag, if set, incoming IMAP mail will be checked for being junk.
- **/
-void
-camel_session_set_check_junk_for_imap (CamelSession *session, gboolean check_junk_for_imap)
-{
-	g_assert(CAMEL_IS_SESSION(session));
-
-	session->check_junk_for_imap = check_junk_for_imap;
-}
Index: camel/camel-session.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-session.h,v
retrieving revision 1.47
diff -u -3 -r1.47 camel-session.h
--- camel/camel-session.h	19 Feb 2004 07:27:35 -0000	1.47
+++ camel/camel-session.h	26 Feb 2004 07:35:38 -0000
@@ -64,11 +64,10 @@
 	struct _CamelSessionPrivate *priv;
 
 	char *storage_path;
-	gboolean online;
-
 	CamelJunkPlugin *junk_plugin;
-	gboolean check_junk;
-	gboolean check_junk_for_imap;
+
+	gboolean online:1;
+	gboolean check_junk:1;
 };
 
 #ifdef ENABLE_THREADS
@@ -170,9 +169,6 @@
 gboolean  camel_session_check_junk               (CamelSession *session);
 void      camel_session_set_check_junk           (CamelSession *session,
 						  gboolean      check_junk);
-gboolean  camel_session_check_junk_for_imap      (CamelSession *session);
-void      camel_session_set_check_junk_for_imap  (CamelSession *session,
-						  gboolean      check_junk_for_imap);
 
 #ifdef ENABLE_THREADS
 struct _CamelSessionThreadOps {
Index: camel/providers/imap/camel-imap-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-folder.c,v
retrieving revision 1.318
diff -u -3 -r1.318 camel-imap-folder.c
--- camel/providers/imap/camel-imap-folder.c	25 Feb 2004 03:47:03 -0000	1.318
+++ camel/providers/imap/camel-imap-folder.c	26 Feb 2004 07:35:39 -0000
@@ -257,11 +257,14 @@
 		return NULL;
 	}
 
-	if (!strcasecmp (folder_name, "INBOX")) {
+	if (!g_ascii_strcasecmp (folder_name, "INBOX")) {
 		if ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX))
 			folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
-		if (!camel_session_check_junk_for_imap (CAMEL_SERVICE (parent)->session))
-			folder->folder_flags |= CAMEL_FOLDER_SUPRESS_JUNK_TEST;
+		if ((imap_store->parameters & IMAP_PARAM_FILTER_JUNK))
+			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
+	} else {
+		if ((imap_store->parameters & (IMAP_PARAM_FILTER_JUNK|IMAP_PARAM_FILTER_JUNK_INBOX)) == (IMAP_PARAM_FILTER_JUNK))
+			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
 	}
 
 	imap_folder->search = camel_imap_search_new(folder_dir);
@@ -1234,7 +1237,7 @@
 	CamelImapResponse *response;
 	char *uid;
 	int count;
-	
+
 	count = camel_folder_summary_count (folder->summary);
 	response = do_append (folder, message, info, &uid, ex);
 	if (!response)
@@ -2393,12 +2396,6 @@
 	}
 	g_ptr_array_free (fetch_data, TRUE);
 	
-	/* update CAMEL_FOLDER_SUPRESS_JUNK_TEST flag, it may changed in session */
-	if (camel_session_check_junk_for_imap (CAMEL_SERVICE (store)->session))
-		folder->folder_flags &= ~CAMEL_FOLDER_SUPRESS_JUNK_TEST;
-	else
-		folder->folder_flags |= CAMEL_FOLDER_SUPRESS_JUNK_TEST;
-
 	/* And add the entries to the summary, etc. */
 	for (i = 0; i < messages->len; i++) {
 		mi = messages->pdata[i];
Index: camel/providers/imap/camel-imap-provider.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-provider.c,v
retrieving revision 1.27
diff -u -3 -r1.27 camel-imap-provider.c
--- camel/providers/imap/camel-imap-provider.c	19 Feb 2004 07:27:38 -0000	1.27
+++ camel/providers/imap/camel-imap-provider.c	26 Feb 2004 07:35:39 -0000
@@ -62,6 +62,10 @@
 	{ CAMEL_PROVIDER_CONF_SECTION_END },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
 	  N_("Apply filters to new messages in INBOX on this server"), "0" },
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
+	  N_("Check new messages for Junk contents"), "0" },
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk_inbox", "filter_junk",
+	  N_("Only check for Junk messages in the INBOX folder"), "0" },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "offline_sync", NULL,
 	  N_("Automatically synchronize remote mail locally"), "0" },
 	{ CAMEL_PROVIDER_CONF_END }
Index: camel/providers/imap/camel-imap-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store.c,v
retrieving revision 1.270
diff -u -3 -r1.270 camel-imap-store.c
--- camel/providers/imap/camel-imap-store.c	24 Feb 2004 14:01:29 -0000	1.270
+++ camel/providers/imap/camel-imap-store.c	26 Feb 2004 07:35:39 -0000
@@ -322,6 +322,10 @@
 		imap_store->parameters |= IMAP_PARAM_FILTER_INBOX;
 		store->flags |= CAMEL_STORE_FILTER_INBOX;
 	}
+	if (camel_url_get_param (url, "filter_junk"))
+		imap_store->parameters |= IMAP_PARAM_FILTER_JUNK;
+	if (camel_url_get_param (url, "filter_junk_inbox"))
+		imap_store->parameters |= IMAP_PARAM_FILTER_JUNK_INBOX;
 
 	/* setup/load the store summary */
 	tmp = alloca(strlen(imap_store->storage_path)+32);
@@ -368,15 +372,17 @@
 		if ((tag & CAMEL_ARG_TAG) <= CAMEL_IMAP_STORE_ARG_FIRST ||
 		    (tag & CAMEL_ARG_TAG) >= CAMEL_IMAP_STORE_ARG_FIRST + 100)
 			continue;
-		
-		if (tag == CAMEL_IMAP_STORE_NAMESPACE) {
+
+		switch (tag) {
+		case CAMEL_IMAP_STORE_NAMESPACE:
 			if (strcmp (store->namespace, args->argv[i].ca_str) != 0) {
 				g_free (store->namespace);
 				store->namespace = g_strdup (args->argv[i].ca_str);
 				/* the current imap code will need to do a reconnect for this to take effect */
 				/*reconnect = TRUE;*/
 			}
-		} else if (tag == CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE) {
+			break;
+		case CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE:
 			flags = args->argv[i].ca_int ? IMAP_PARAM_OVERRIDE_NAMESPACE : 0;
 			flags |= (store->parameters & ~IMAP_PARAM_OVERRIDE_NAMESPACE);
 			
@@ -385,17 +391,28 @@
 				/* the current imap code will need to do a reconnect for this to take effect */
 				/*reconnect = TRUE;*/
 			}
-		} else if (tag == CAMEL_IMAP_STORE_CHECK_ALL) {
+			break;
+		case CAMEL_IMAP_STORE_CHECK_ALL:
 			flags = args->argv[i].ca_int ? IMAP_PARAM_CHECK_ALL : 0;
 			flags |= (store->parameters & ~IMAP_PARAM_CHECK_ALL);
 			store->parameters = flags;
 			/* no need to reconnect for this option to take effect... */
-		} else if (tag == CAMEL_IMAP_STORE_FILTER_INBOX) {
+			break;
+		case CAMEL_IMAP_STORE_FILTER_INBOX:
 			flags = args->argv[i].ca_int ? IMAP_PARAM_FILTER_INBOX : 0;
 			flags |= (store->parameters & ~IMAP_PARAM_FILTER_INBOX);
 			store->parameters = flags;
 			/* no need to reconnect for this option to take effect... */
-		} else {
+			break;
+		case CAMEL_IMAP_STORE_FILTER_JUNK:
+			flags = args->argv[i].ca_int ? IMAP_PARAM_FILTER_JUNK : 0;
+			store->parameters = flags | (store->parameters & ~IMAP_PARAM_FILTER_JUNK);
+			break;
+		case CAMEL_IMAP_STORE_FILTER_JUNK_INBOX:
+			flags = args->argv[i].ca_int ? IMAP_PARAM_FILTER_JUNK_INBOX : 0;
+			store->parameters = flags | (store->parameters & ~IMAP_PARAM_FILTER_JUNK_INBOX);
+			break;
+		default:
 			/* error?? */
 			continue;
 		}
@@ -428,21 +445,23 @@
 		
 		switch (tag) {
 		case CAMEL_IMAP_STORE_NAMESPACE:
-			/* get the username */
 			*args->argv[i].ca_str = store->namespace;
 			break;
 		case CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE:
-			/* get the auth mechanism */
 			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE ? TRUE : FALSE;
 			break;
 		case CAMEL_IMAP_STORE_CHECK_ALL:
-			/* get the hostname */
 			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_CHECK_ALL ? TRUE : FALSE;
 			break;
 		case CAMEL_IMAP_STORE_FILTER_INBOX:
-			/* get the port */
 			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_FILTER_INBOX ? TRUE : FALSE;
 			break;
+		case CAMEL_IMAP_STORE_FILTER_JUNK:
+			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_FILTER_JUNK ? TRUE : FALSE;
+			break;
+		case CAMEL_IMAP_STORE_FILTER_JUNK_INBOX:
+			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_FILTER_JUNK_INBOX ? TRUE : FALSE;
+			break;
 		default:
 			/* error? */
 			break;
Index: camel/providers/imap/camel-imap-store.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store.h,v
retrieving revision 1.57
diff -u -3 -r1.57 camel-imap-store.h
--- camel/providers/imap/camel-imap-store.h	10 Dec 2003 19:22:20 -0000	1.57
+++ camel/providers/imap/camel-imap-store.h	26 Feb 2004 07:35:39 -0000
@@ -63,19 +63,22 @@
 	CAMEL_IMAP_STORE_ARG_NAMESPACE,
 	CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE,
 	CAMEL_IMAP_STORE_ARG_CHECK_ALL,
-	CAMEL_IMAP_STORE_ARG_FILTER_INBOX
+	CAMEL_IMAP_STORE_ARG_FILTER_INBOX,
+	CAMEL_IMAP_STORE_ARG_FILTER_JUNK,
+	CAMEL_IMAP_STORE_ARG_FILTER_JUNK_INBOX,
 };
 
 #define CAMEL_IMAP_STORE_NAMESPACE           (CAMEL_IMAP_STORE_ARG_NAMESPACE | CAMEL_ARG_STR)
 #define CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE  (CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE | CAMEL_ARG_INT)
 #define CAMEL_IMAP_STORE_CHECK_ALL           (CAMEL_IMAP_STORE_ARG_CHECK_ALL | CAMEL_ARG_INT)
 #define CAMEL_IMAP_STORE_FILTER_INBOX        (CAMEL_IMAP_STORE_ARG_FILTER_INBOX | CAMEL_ARG_INT)
+#define CAMEL_IMAP_STORE_FILTER_JUNK         (CAMEL_IMAP_STORE_ARG_FILTER_JUNK | CAMEL_ARG_BOO)
+#define CAMEL_IMAP_STORE_FILTER_JUNK_INBOX   (CAMEL_IMAP_STORE_ARG_FILTER_JUNK_INBOX | CAMEL_ARG_BOO)
 
 /* CamelFolderInfo flags */
 #define CAMEL_IMAP_FOLDER_MARKED	     (1<<16)
 #define CAMEL_IMAP_FOLDER_UNMARKED	     (1<<17)
 
-
 typedef enum {
 	IMAP_LEVEL_UNKNOWN,
 	IMAP_LEVEL_IMAP4,
@@ -95,6 +98,8 @@
 #define IMAP_PARAM_OVERRIDE_NAMESPACE		(1 << 0)
 #define IMAP_PARAM_CHECK_ALL			(1 << 1)
 #define IMAP_PARAM_FILTER_INBOX			(1 << 2)
+#define IMAP_PARAM_FILTER_JUNK			(1 << 3)
+#define IMAP_PARAM_FILTER_JUNK_INBOX		(1 << 4)
 
 struct _CamelImapStore {
 	CamelDiscoStore parent_object;	
Index: camel/providers/imap/camel-imap-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-utils.c,v
retrieving revision 1.71
diff -u -3 -r1.71 camel-imap-utils.c
--- camel/providers/imap/camel-imap-utils.c	10 Dec 2003 19:22:20 -0000	1.71
+++ camel/providers/imap/camel-imap-utils.c	26 Feb 2004 07:35:40 -0000
@@ -460,7 +460,7 @@
 	char *flag_list;
 	
 	gstr = g_string_new ("(");
-	
+
 	if (flags & CAMEL_MESSAGE_ANSWERED)
 		g_string_append (gstr, "\\Answered ");
 	if (flags & CAMEL_MESSAGE_DELETED)
@@ -471,12 +471,12 @@
 		g_string_append (gstr, "\\Flagged ");
 	if (flags & CAMEL_MESSAGE_SEEN)
 		g_string_append (gstr, "\\Seen ");
-	
+
 	if (gstr->str[gstr->len - 1] == ' ')
 		gstr->str[gstr->len - 1] = ')';
 	else
 		g_string_append_c (gstr, ')');
-	
+
 	flag_list = gstr->str;
 	g_string_free (gstr, FALSE);
 	return flag_list;
@@ -496,18 +496,20 @@
 	
 	while (*flag_list && *flag_list != ')') {
 		len = strcspn (flag_list, " )");
-		if (!strncasecmp (flag_list, "\\Answered", len))
+		if (!g_ascii_strncasecmp (flag_list, "\\Answered", len))
 			flags |= CAMEL_MESSAGE_ANSWERED;
-		else if (!strncasecmp (flag_list, "\\Deleted", len))
+		else if (!g_ascii_strncasecmp (flag_list, "\\Deleted", len))
 			flags |= CAMEL_MESSAGE_DELETED;
-		else if (!strncasecmp (flag_list, "\\Draft", len))
+		else if (!g_ascii_strncasecmp (flag_list, "\\Draft", len))
 			flags |= CAMEL_MESSAGE_DRAFT;
-		else if (!strncasecmp (flag_list, "\\Flagged", len))
+		else if (!g_ascii_strncasecmp (flag_list, "\\Flagged", len))
 			flags |= CAMEL_MESSAGE_FLAGGED;
-		else if (!strncasecmp (flag_list, "\\Seen", len))
+		else if (!g_ascii_strncasecmp (flag_list, "\\Seen", len))
 			flags |= CAMEL_MESSAGE_SEEN;
-		else if (!strncasecmp (flag_list, "\\Recent", len))
+		else if (!g_ascii_strncasecmp (flag_list, "\\Recent", len))
 			flags |= CAMEL_IMAP_MESSAGE_RECENT;
+		else if (!g_ascii_strncasecmp(flag_list, "\\*", len))
+			flags |= CAMEL_MESSAGE_USER;
 		
 		flag_list += len;
 		if (*flag_list == ' ')
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3132
diff -u -3 -r1.3132 ChangeLog
--- mail/ChangeLog	25 Feb 2004 21:11:47 -0000	1.3132
+++ mail/ChangeLog	26 Feb 2004 07:35:42 -0000
@@ -1,3 +1,18 @@
+2004-02-26  Not Zed  <NotZed Ximian com>
+
+	* mail-session.c (mail_session_check_junk_notify): remove
+	check_incoming_imap test.
+	(mail_session_init): "
+
+	* evolution-mail.schemas.in.in: Remove check_incoming_imap option.
+
+	* mail-config.glade: Remove check incoming imap checkbox.
+
+	* em-mailer-prefs.c (em_mailer_prefs_construct): remove
+	check_incoming_imap test.
+	(em_mailer_prefs_apply): "
+	(settings_changed): "
+
 2004-02-25  Jeffrey Stedfast  <fejj ximian com>
 
 	* em-format-html-display.c (efhd_attachment_button): Protect
Index: mail/em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.6
diff -u -3 -r1.6 em-mailer-prefs.c
--- mail/em-mailer-prefs.c	23 Jan 2004 17:21:42 -0000	1.6
+++ mail/em-mailer-prefs.c	26 Feb 2004 07:35:42 -0000
@@ -160,7 +160,6 @@
 {
 	EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
 	
-	gtk_widget_set_sensitive (GTK_WIDGET (prefs->check_incoming_imap), gtk_toggle_button_get_active (prefs->check_incoming));
 	if (prefs->control)
 		evolution_config_control_changed (prefs->control);
 }
@@ -654,12 +653,6 @@
 	gtk_toggle_button_set_active (prefs->check_incoming, bool);
 	g_signal_connect (prefs->check_incoming, "toggled", G_CALLBACK (settings_changed), prefs);
 
-	prefs->check_incoming_imap = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkDoNotCheckIMAP"));
-	gtk_widget_set_sensitive (GTK_WIDGET (prefs->check_incoming_imap), check_incoming);
-	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming_imap", NULL);
-	gtk_toggle_button_set_active (prefs->check_incoming_imap, !bool);
-	g_signal_connect (prefs->check_incoming_imap, "toggled", G_CALLBACK (settings_changed), prefs);
-
 	prefs->sa_local_tests_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSALocalTestsOnly"));
 	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/junk/sa/local_only", NULL);
 	gtk_toggle_button_set_active (prefs->sa_local_tests_only, bool);
@@ -808,8 +801,6 @@
 	/* junk prefs */
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming",
 			       gtk_toggle_button_get_active (prefs->check_incoming), NULL);
-	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming_imap",
-			       !gtk_toggle_button_get_active (prefs->check_incoming_imap), NULL);
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/sa/local_only",
 			       gtk_toggle_button_get_active (prefs->sa_local_tests_only), NULL);
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/sa/use_daemon",
Index: mail/em-mailer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.h,v
retrieving revision 1.7
diff -u -3 -r1.7 em-mailer-prefs.h
--- mail/em-mailer-prefs.h	23 Jan 2004 17:21:42 -0000	1.7
+++ mail/em-mailer-prefs.h	26 Feb 2004 07:35:42 -0000
@@ -116,7 +116,6 @@
 
 	/* Junk prefs */
 	GtkToggleButton *check_incoming;
-	GtkToggleButton *check_incoming_imap;
 	GtkToggleButton *sa_local_tests_only;
 	GtkToggleButton *sa_use_daemon;
 };
Index: mail/evolution-mail.schemas.in.in
===================================================================
RCS file: /cvs/gnome/evolution/mail/evolution-mail.schemas.in.in,v
retrieving revision 1.8
diff -u -3 -r1.8 evolution-mail.schemas.in.in
--- mail/evolution-mail.schemas.in.in	13 Feb 2004 14:53:57 -0000	1.8
+++ mail/evolution-mail.schemas.in.in	26 Feb 2004 07:35:42 -0000
@@ -688,20 +688,6 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/evolution/mail/junk/check_incoming_imap</key>
-      <applyto>/apps/evolution/mail/junk/check_incoming_imap</applyto>
-      <owner>evolution-mail</owner>
-      <type>bool</type>
-      <default>true</default>
-      <locale name="C">
-         <short>Check incoming mail being junk for IMAP accounts</short>
-         <long>
-          Run junk test on incoming mail for IMAP accounts (only valid if check_incoming is set to true)
-         </long>
-      </locale>
-    </schema>
-
-    <schema>
       <key>/schemas/apps/evolution/mail/junk/sa/local_only</key>
       <applyto>/apps/evolution/mail/junk/sa/local_only</applyto>
       <owner>evolution-mail</owner>
Index: mail/mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.130
diff -u -3 -r1.130 mail-config.glade
--- mail/mail-config.glade	18 Feb 2004 20:55:47 -0000	1.130
+++ mail/mail-config.glade	26 Feb 2004 07:35:43 -0000
@@ -4678,58 +4678,6 @@
 		  <property name="fill">False</property>
 		</packing>
 	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox177">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label475">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">    </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="chkDoNotCheckIMAP">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Do _Not Check Incoming Mail For IMAP Accounts</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
Index: mail/mail-session.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-session.c,v
retrieving revision 1.87
diff -u -3 -r1.87 mail-session.c
--- mail/mail-session.c	25 Feb 2004 18:40:29 -0000	1.87
+++ mail/mail-session.c	26 Feb 2004 07:35:43 -0000
@@ -771,8 +771,6 @@
 		key ++;
 		if (!strcmp (key, "check_incoming"))
 			camel_session_set_check_junk (session, gconf_value_get_bool (gconf_entry_get_value (entry)));
-		else if (!strcmp (key, "check_incoming_imap"))
-			camel_session_set_check_junk_for_imap (session, gconf_value_get_bool (gconf_entry_get_value (entry)));
 	}
 }
 
@@ -793,7 +791,6 @@
 	gconf = mail_config_get_gconf_client ();
 	gconf_client_add_dir (gconf, "/apps/evolution/mail/junk", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
 	camel_session_set_check_junk (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming", NULL));
-	camel_session_set_check_junk_for_imap (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming_imap", NULL));
 	session_check_junk_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/junk",
 								(GConfClientNotifyFunc) mail_session_check_junk_notify,
 								session, NULL, NULL);


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