aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-13 23:29:10 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-13 23:29:10 +0800
commit65b35b58c7e0c0f7aed2c4512d9652540da3694b (patch)
treee67358f06a6ac69bae436b32eb456cabb7cb9581 /mail
parent845a98e52a301cb99f8f48a6fdc85c4ab1046dc1 (diff)
downloadgsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar.gz
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar.bz2
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar.lz
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar.xz
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.tar.zst
gsoc2013-evolution-65b35b58c7e0c0f7aed2c4512d9652540da3694b.zip
Updated to reflect changes in the filter API by passing in the provided
2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_filter): Updated to reflect changes in the filter API by passing in the provided uid cache to camel_filter_driver_filter_folder. (mail_filter_folder): Set the cache to NULL. (mail_fetch_mail): Set the cache to NULL. (fetch_mail_fetch): If a cache exists for this folder, set it. When we are finished filtering the incoming messages, the logic changes a bit. We now save the cache if keep_on_server is set *or* if there was an exception this way if the user's download gets interrupted, he won't have to download all the messages again. (fetch_mail_fetch): Oh yea, and just so if we get an exception with `delete' turned on, the next time the user checks mail and an exception *doesn't* occur, it will go back and mark all the messages for deletion. svn path=/trunk/; revision=11086
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-ops.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8702985d02..8d1bb0a264 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -11,6 +11,10 @@
set *or* if there was an exception this way if the user's download
gets interrupted, he won't have to download all the messages
again.
+ (fetch_mail_fetch): Oh yea, and just so if we get an exception
+ with `delete' turned on, the next time the user checks mail and an
+ exception *doesn't* occur, it will go back and mark all the
+ messages for deletion.
2001-07-12 Iain Holmes <iain@ximian.com>
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 9aef60cc29..bcb171db80 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -277,6 +277,21 @@ fetch_mail_fetch (struct _mail_msg *mm)
* exception, save the UID cache */
if (!fm->delete || camel_exception_is_set (&mm->ex))
camel_uid_cache_save (cache);
+
+ /* if we are deleting off the server an no exception occured
+ * then iterate through the folder uids and mark them all
+ * for deletion. */
+ if (fm->delete && !camel_exception_is_set (&mm->ex)) {
+ camel_folder_freeze (folder);
+
+ for (i = 0; i < folder_uids->len; i++)
+ camel_folder_delete_message (folder, folder_uids->pdata[i]);
+
+ /* sync and expunge */
+ camel_folder_sync (folder, TRUE, &mm->ex);
+
+ camel_folder_thaw (folder);
+ }
}
camel_uid_cache_destroy (cache);
camel_folder_free_uids (folder, folder_uids);