aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-09-26 10:39:16 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-09-26 10:39:16 +0800
commite45b3e48281defcf3df2761b4bf3ce0c3b2d5357 (patch)
treec6e1bee3fcdbb0ef6d25c0c262d6a77dc3cf3b79
parent5cec46ca6a47b521c36be8105fe4bbabd974dbc2 (diff)
downloadgsoc2013-evolution-e45b3e48281defcf3df2761b4bf3ce0c3b2d5357.tar.gz
gsoc2013-evolution-e45b3e48281defcf3df2761b4bf3ce0c3b2d5357.tar.zst
gsoc2013-evolution-e45b3e48281defcf3df2761b4bf3ce0c3b2d5357.zip
Store the folder flags in the store summary. (get_one_folder_offline): Set
2002-09-26 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Store the folder flags in the store summary. (get_one_folder_offline): Set the noselect url parameter if this is a noselect folder, from the stored summary flags. #30877. svn path=/trunk/; revision=18229
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/providers/imap/camel-imap-store.c22
2 files changed, 27 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b7972266b9..651cede20a 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-26 Not Zed <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-store.c
+ (parse_list_response_as_folder_info): Store the folder flags in
+ the store summary.
+ (get_one_folder_offline): Set the noselect url parameter if this
+ is a noselect folder, from the stored summary flags. #30877.
+
2002-09-23 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-filter-charset.c (complete): Handle EILSEQ by eating
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 3ecfde7658..b23be5f576 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1909,7 +1909,9 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
int flags, i;
char sep, *dir, *name = NULL, *path;
CamelURL *url;
-
+ CamelImapStoreInfo *si;
+ guint32 newflags;
+
if (!imap_parse_list_response (imap_store, response, &flags, &sep, &dir))
return NULL;
@@ -1917,8 +1919,13 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
path = camel_utf7_utf8(dir);
/* hack: pokes in value from any list response */
- camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
-
+ si = camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
+ newflags = (si->info.flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
+ if (si->info.flags != newflags) {
+ si->info.flags = newflags;
+ camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
+ }
+
if (sep && (name = strrchr(path, sep))) {
if (!*++name) {
g_free(dir);
@@ -2381,6 +2388,15 @@ get_one_folder_offline (const char *physical_path, const char *path, gpointer da
if ((((CamelStore *)imap_store)->flags & CAMEL_STORE_SUBSCRIPTIONS) == 0
|| si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
fi = imap_build_folder_info(imap_store, path+1);
+ fi->flags = si->flags;
+ if (si->flags & CAMEL_FOLDER_NOSELECT) {
+ CamelURL *url = camel_url_new(fi->url, NULL);
+
+ camel_url_set_param (url, "noselect", "yes");
+ g_free(fi->url);
+ fi->url = camel_url_to_string (url, 0);
+ camel_url_free (url);
+ }
g_ptr_array_add (folders, fi);
}
camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);