diff options
author | Not Zed <NotZed@Ximian.com> | 2005-03-01 00:58:02 +0000 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-03-01 00:58:02 +0000 |
commit | 43c9adec54899b74dc0392ef85f824b2904e0060 (patch) | |
tree | 466a5ae525a658785b3a1f3745d315fb878ae554 | |
parent | fd1fac36a56fe98fbf4b5f61e0cae4d91fa5d2b1 (diff) | |
download | evolution-data-server-43c9adec54899b74dc0392ef85f824b2904e0060.tar.gz |
** See bug #70590
2005-02-28 Not Zed <NotZed@Ximian.com>
** See bug #70590
* camel-filter-driver.c (do_move): Make this copy+delete, and
terminate processing implicitly.
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 28 |
2 files changed, 27 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index b5834e5e5..431fafe64 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2005-02-28 Not Zed <NotZed@Ximian.com> + + ** See bug #70590 + + * camel-filter-driver.c (do_move): Make this copy+delete, and + terminate processing implicitly. + 2005-02-24 Not Zed <NotZed@Ximian.com> ** See bug #68459 diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index a0c45712e..8a92efe5d 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -516,6 +516,7 @@ do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv /* open folders we intent to move to */ char *folder = argv[i]->value.string; CamelFolder *outbox; + int last; outbox = open_folder (driver, folder); if (!outbox) @@ -523,13 +524,16 @@ do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv if (outbox == p->source) break; - + + /* only delete on last folder (only 1 can ever be supplied by ui currently) */ + last = (i == argc-1); + if (!p->modified && p->uid && p->source && camel_folder_has_summary_capability (p->source)) { GPtrArray *uids; - + uids = g_ptr_array_new (); g_ptr_array_add (uids, (char *) p->uid); - camel_folder_transfer_messages_to (p->source, uids, outbox, NULL, FALSE, p->ex); + camel_folder_transfer_messages_to (p->source, uids, outbox, NULL, last, p->ex); g_ptr_array_free (uids, TRUE); } else { if (p->message == NULL) @@ -539,19 +543,27 @@ do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv continue; camel_folder_append_message (outbox, p->message, p->info, NULL, p->ex); + + if (!camel_exception_is_set(p->ex) && last) { + if (p->source && p->uid && camel_folder_has_summary_capability (p->source)) + camel_folder_set_message_flags(p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0); + else + camel_message_info_set_flags(p->info, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED, ~0); + } } if (!camel_exception_is_set (p->ex)) { /* a 'move' is a copy & delete */ p->copied = TRUE; - p->deleted = TRUE; + camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s", folder); } - - camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s", - folder); } } - + + /* implicit 'stop' with 'move' */ + camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing"); + p->terminated = TRUE; + return NULL; } |