aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2004-01-27 22:21:40 +0800
committerRadek Doulik <rodo@src.gnome.org>2004-01-27 22:21:40 +0800
commit7b045e0bdfe4e094e46ee7535c5f6d553060868f (patch)
treeb3ae3a9ac9c4b4849031f39458d6fdf272148a7a /camel/providers/imap
parentce042b31b62f51282a3e66d1d0725fd5236d9096 (diff)
downloadgsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar.gz
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar.bz2
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar.lz
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar.xz
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.tar.zst
gsoc2013-evolution-7b045e0bdfe4e094e46ee7535c5f6d553060868f.zip
set CAMEL_FOLDER_SUPRESS_JUNK_TEST flag (imap_update_summary): update
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 svn path=/trunk/; revision=24463
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-folder.c15
1 files changed, 12 insertions, 3 deletions
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];