aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
author7 <NotZed@Ximian.com>2001-10-18 04:38:15 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-18 04:38:15 +0800
commit3ced16bfa226cdc03aa6e38552a78976d05ff171 (patch)
treebab1bcb881defa086a450e29ecf4338b499ed300 /camel
parent77886091c3d2e63225f5861044bf6cd283ab0592 (diff)
downloadgsoc2013-evolution-3ced16bfa226cdc03aa6e38552a78976d05ff171.tar.gz
gsoc2013-evolution-3ced16bfa226cdc03aa6e38552a78976d05ff171.tar.zst
gsoc2013-evolution-3ced16bfa226cdc03aa6e38552a78976d05ff171.zip
Patch from Danw, Use unread count of -1 to mark unflagged messages. Make
2001-10-17 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): (parse_list_response_as_folder_info): Patch from Danw, Use unread count of -1 to mark unflagged messages. Make sure any folder we dont lookup explicitly is marked as -1. Should fix #9947 and friends. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only touch the summary if the timestamp or size changed. svn path=/trunk/; revision=13731
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/providers/imap/camel-imap-store.c10
-rw-r--r--camel/providers/local/camel-mbox-summary.c11
3 files changed, 23 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 6f19e28d2d..0e91f8b820 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,14 @@
+2001-10-17 <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-store.c (get_folder_info_online):
+ (parse_list_response_as_folder_info): Patch from Danw, Use unread
+ count of -1 to mark unflagged messages. Make sure any folder we
+ dont lookup explicitly is marked as -1. Should fix #9947 and
+ friends.
+
+ * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
+ touch the summary if the timestamp or size changed.
+
2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (camel_filter_driver_filter_message): Set
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 4ad2021c64..6d996ffe9f 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1281,7 +1281,7 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
fi->url = camel_url_to_string (url, 0);
camel_url_free (url);
- if (!(flags & IMAP_LIST_FLAG_UNMARKED))
+ if (flags & IMAP_LIST_FLAG_UNMARKED)
fi->unread_message_count = -1;
return fi;
@@ -1452,7 +1452,7 @@ get_folder_info_online (CamelStore *store, const char *top,
fi->full_name = g_strdup ("INBOX");
fi->name = g_strdup ("INBOX");
fi->url = uri;
- fi->unread_message_count = -1;
+ fi->unread_message_count = 0;
g_ptr_array_add (folders, fi);
}
@@ -1480,7 +1480,7 @@ get_folder_info_online (CamelStore *store, const char *top,
*/
url = camel_url_new (fi->url, NULL);
noselect = url ? camel_url_get_param (url, "noselect") : NULL;
- if (fi->unread_message_count != -1 || (noselect && !g_strcasecmp (noselect, "yes"))) {
+ if (fi->unread_message_count == -1 || (noselect && !g_strcasecmp (noselect, "yes"))) {
camel_url_free (url);
continue;
}
@@ -1490,8 +1490,10 @@ get_folder_info_online (CamelStore *store, const char *top,
* checking INBOX.
*/
if ((!(imap_store->parameters & IMAP_PARAM_CHECK_ALL))
- && (g_strcasecmp (fi->name, "INBOX") != 0))
+ && (g_strcasecmp (fi->name, "INBOX") != 0)) {
+ fi->unread_message_count = -1;
continue;
+ }
/* For the current folder, poke it to check for new
* messages and then report that number, rather than
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 89cc831b4a..008b5d6026 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -399,8 +399,7 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, Camel
/* FIXME: move upstream? */
if (ret != -1) {
- if (mbs->folder_size != st.st_size
- || s->time != st.st_mtime) {
+ if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
mbs->folder_size = st.st_size;
s->time = st.st_mtime;
camel_folder_summary_touch(s);
@@ -876,9 +875,11 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
return -1;
}
- camel_folder_summary_touch(s);
- s->time = st.st_mtime;
- mbs->folder_size = st.st_size;
+ if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
+ s->time = st.st_mtime;
+ mbs->folder_size = st.st_size;
+ camel_folder_summary_touch(s);
+ }
return ((CamelLocalSummaryClass *)camel_mbox_summary_parent)->sync(cls, expunge, changeinfo, ex);
}