diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-folder.c | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ad335db84f..8d4f4d884b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-10-20 <NotZed@Ximian.com> + + * 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. + 2001-10-19 Jeffrey Stedfast <fejj@ximian.com> * camel-vtrash-folder.c (vtrash_move_messages_to): If the 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); } /** |