aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-05-29 10:35:42 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-05-29 10:35:42 +0800
commitbb2af981843efad96dac9d48015e88fdd0a26085 (patch)
treea5980fd534f46d33c9d86f3c44864b98ad81d32f /camel
parent0c4f8063584fb5587df2d58411fbbdc581835ac7 (diff)
downloadgsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar.gz
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar.bz2
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar.lz
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar.xz
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.tar.zst
gsoc2013-evolution-bb2af981843efad96dac9d48015e88fdd0a26085.zip
Implement. Run a summary check to update for any newly arrived messages.
2002-05-28 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-folder.c (maildir_refresh_info): Implement. Run a summary check to update for any newly arrived messages. * providers/local/camel-maildir-store.c (scan_dir): If we have a folder, execute a refresh_info on it, to suck in any new stuff. svn path=/trunk/; revision=17029
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/providers/local/camel-maildir-folder.c16
-rw-r--r--camel/providers/local/camel-maildir-store.c5
3 files changed, 31 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index ba2236e2d6..ebe58c0678 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-28 Not Zed <NotZed@Ximian.com>
+
+ * providers/local/camel-maildir-folder.c (maildir_refresh_info):
+ Implement. Run a summary check to update for any newly arrived
+ messages.
+
+ * providers/local/camel-maildir-store.c (scan_dir): If we have a
+ folder, execute a refresh_info on it, to suck in any new stuff.
+
2002-05-28 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (camel_filter_driver_log): Use the
@@ -23,6 +32,7 @@
code using CamelRemoteStore.
(camel_nntp_command): Don't call camel_remote_store_connected().
+>>>>>>> 1.1492
2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-folder.c (content_info_get_part_spec):
@@ -49,6 +59,7 @@
* providers/imap/camel-imap-store.c (connect_to_server): Added
some NULL protection fixes.
+>>>>>>> 1.1491
2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
* camel-remote-store.c: Removed from the build. Glory glory
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index 05fdd70e10..3b1ba7ef86 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -54,6 +54,7 @@ static CamelLocalSummary *maildir_create_summary(const char *path, const char *f
static void maildir_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, char **appended_uid, CamelException * ex);
static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex);
+static void maildir_refresh_info(CamelFolder *folder, CamelException *ex);
static void maildir_finalize(CamelObject * object);
@@ -67,6 +68,7 @@ static void camel_maildir_folder_class_init(CamelObjectClass * camel_maildir_fol
/* virtual method definition */
/* virtual method overload */
+ camel_folder_class->refresh_info = maildir_refresh_info;
camel_folder_class->append_message = maildir_append_message;
camel_folder_class->get_message = maildir_get_message;
@@ -126,6 +128,20 @@ static CamelLocalSummary *maildir_create_summary(const char *path, const char *f
}
static void
+maildir_refresh_info(CamelFolder *folder, CamelException *ex)
+{
+ CamelLocalFolder *lf = (CamelLocalFolder *)folder;
+
+ if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1)
+ return;
+
+ if (camel_folder_change_info_changed(lf->changes)) {
+ camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes);
+ camel_folder_change_info_clear(lf->changes);
+ }
+}
+
+static void
maildir_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, CamelException *ex)
{
CamelMaildirFolder *maildir_folder = (CamelMaildirFolder *)folder;
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index ef152b132f..caae276e14 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -276,8 +276,11 @@ static int scan_dir(CamelStore *store, GHashTable *visited, char *root, const ch
CAMEL_STORE_LOCK(store, cache_lock);
folder = g_hash_table_lookup(store->folders, path);
- if (folder)
+ if (folder) {
+ if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
+ camel_folder_refresh_info(folder, NULL);
unread = camel_folder_get_unread_message_count(folder);
+ }
CAMEL_STORE_UNLOCK(store, cache_lock);
/* if we dont have a folder, then scan the directory and get the unread