From a1709b95e1e6f7037a0c83cabfb2fcce9bde1946 Mon Sep 17 00:00:00 2001 From: 0 Date: Sat, 20 Oct 2001 01:01:06 +0000 Subject: If no exception supplied, use a local one. (move_message_to): Set the seen 2001-10-20 * camel-folder.c (move_messages_to): If no exception supplied, use a local one. (move_message_to): Set the seen flag also when we delete it. svn path=/trunk/; revision=13817 --- camel/camel-folder.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'camel/camel-folder.c') diff --git a/camel/camel-folder.c b/camel/camel-folder.c index e5ae0ba2e5..7599fec35d 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -1223,8 +1223,7 @@ camel_folder_copy_messages_to (CamelFolder *source, GPtrArray *uids, static void -move_message_to (CamelFolder *source, const char *uid, - CamelFolder *dest, CamelException *ex) +move_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelException *ex) { CamelMimeMessage *msg; CamelMessageInfo *info = NULL; @@ -1247,8 +1246,7 @@ move_message_to (CamelFolder *source, const char *uid, camel_folder_append_message (dest, msg, info, ex); camel_object_unref (CAMEL_OBJECT (msg)); if (!camel_exception_is_set (ex)) - CF_CLASS (source)->set_message_flags (source, uid, CAMEL_MESSAGE_DELETED, - CAMEL_MESSAGE_DELETED); + camel_folder_set_message_flags (source, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0); if (info) { if (source->folder_flags & CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY) @@ -1262,15 +1260,21 @@ static void move_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex) { int i; + CamelException local; + + camel_exception_init(&local); + if (ex == NULL) + ex = &local; camel_operation_start(NULL, _("Moving messages")); - + for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++) { move_message_to (source, uids->pdata[i], dest, ex); camel_operation_progress(NULL, i * 100 / uids->len); } camel_operation_end(NULL); + camel_exception_clear(&local); } /** -- cgit