aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-local.c2
-rw-r--r--mail/mail-ops.c35
3 files changed, 12 insertions, 35 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5ec5c7b1d1..fcb6893bed 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2002-05-10 Dan Winship <danw@ximian.com>
+
+ * mail-ops.c (transfer_messages_transfer): Simplify. Use
+ transfer_messages_to instead of picking between copy and move.
+ Remove vtrash special-casing since it's all in
+ camel-vtrash-folder.c now. Remove duplicate source == dest check.
+
+ * mail-local.c (mail_local_folder_reconfigure): Use
+ transfer_messages_to instead of copy_messages_to.
+
2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (mail_account_gui_save): Make sure that even
diff --git a/mail/mail-local.c b/mail/mail-local.c
index a90d4ae15f..98a2c78e6f 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -686,7 +686,7 @@ mail_local_folder_reconfigure (MailLocalFolder *mlf, const char *new_format, int
camel_folder_freeze(mlf->real_folder);
uids = camel_folder_get_uids(fromfolder);
- camel_folder_move_messages_to(fromfolder, uids, mlf->real_folder, ex);
+ camel_folder_transfer_messages_to(fromfolder, uids, mlf->real_folder, TRUE, ex);
camel_folder_free_uids(fromfolder, uids);
if (camel_exception_is_set(ex))
goto cleanup;
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index ae01d43c9c..f86a013a7a 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -924,10 +924,6 @@ transfer_messages_transfer (struct _mail_msg *mm)
{
struct _transfer_msg *m = (struct _transfer_msg *)mm;
CamelFolder *dest;
- char *desc;
- void (*func) (CamelFolder *, GPtrArray *,
- CamelFolder *,
- CamelException *);
dest = mail_tool_uri_to_folder (m->dest_uri, m->dest_flags, &mm->ex);
if (camel_exception_is_set (&mm->ex))
@@ -939,39 +935,10 @@ transfer_messages_transfer (struct _mail_msg *mm)
return;
}
- if (m->delete) {
- func = camel_folder_move_messages_to;
- desc = _("Moving");
- } else {
- func = camel_folder_copy_messages_to;
- desc = _("Copying");
- }
-
camel_folder_freeze (m->source);
camel_folder_freeze (dest);
- if (CAMEL_IS_VTRASH_FOLDER (dest)) {
- if (m->delete) {
- int i;
-
- /* Just mark all the messages as deleted */
- for (i = 0; i < m->uids->len; i++)
- camel_folder_delete_message (m->source, m->uids->pdata[i]);
- } else {
- /* no-op - can't copy messages to*/
- }
- } else {
- if (dest == m->source) {
- int i;
-
- /* Undelete the messages if they are marked as deleted */
- for (i = 0; i < m->uids->len; i++)
- camel_folder_set_message_flags (m->source, m->uids->pdata[i],
- CAMEL_MESSAGE_DELETED, 0);
- } else {
- (func) (m->source, m->uids, dest, &mm->ex);
- }
- }
+ camel_folder_transfer_messages_to (m->source, m->uids, dest, m->delete, &mm->ex);
camel_folder_thaw (m->source);
camel_folder_thaw (dest);