diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/camel-folder.c | 2 | ||||
-rw-r--r-- | camel/camel-folder.h | 1 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 15 |
4 files changed, 25 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index d3e7709fd1..711a953e4a 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2004-01-27 Radek Doulik <rodo@ximian.com> + + * providers/imap/camel-imap-folder.c (camel_imap_folder_new): set + CAMEL_FOLDER_SUPRESS_JUNK_TEST flag + (imap_update_summary): update CAMEL_FOLDER_SUPRESS_JUNK_TEST flag + + * camel-folder.c (folder_changed): use + CAMEL_FOLDER_SUPRESS_JUNK_TEST flag instead of check_junk_for_imap + + * camel-folder.h (CAMEL_FOLDER_SUPRESS_JUNK_TEST): added new flag + 2004-01-27 Not Zed <NotZed@Ximian.com> ** See bug #53373. diff --git a/camel/camel-folder.c b/camel/camel-folder.c index c2ff8ef759..3bf6db50a0 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -1648,7 +1648,7 @@ folder_changed (CamelObject *obj, gpointer event_data) CamelSession *session = ((CamelService *)folder->parent_store)->session; CamelFilterDriver *driver = NULL; - if (((folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) || (camel_session_check_junk (session) && camel_session_check_junk_for_imap (session))) + if (((folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) || (camel_session_check_junk (session) && !(folder->folder_flags & CAMEL_FOLDER_SUPRESS_JUNK_TEST))) && 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); diff --git a/camel/camel-folder.h b/camel/camel-folder.h index 83df665147..15e1aacb8b 100644 --- a/camel/camel-folder.h +++ b/camel/camel-folder.h @@ -104,6 +104,7 @@ struct _CamelFolder #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) typedef struct { CamelObjectClass parent_class; diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index e18fbd0719..4e49e4a3e7 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -257,9 +257,12 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name, return NULL; } - if ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX) && - !strcasecmp (folder_name, "INBOX")) - folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT; + if (!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; + } imap_folder->search = camel_imap_search_new(folder_dir); @@ -2393,6 +2396,12 @@ imap_update_summary (CamelFolder *folder, int exists, } 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]; |