aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-05-11 00:46:04 +0800
committerDan Winship <danw@src.gnome.org>2002-05-11 00:46:04 +0800
commitcf18d0940f9abbe8bb032d08a0fb33067def30d7 (patch)
treec949128284ce4c049db4a3a2945f8cfc3deb1e3e /mail/mail-ops.c
parent6952dcb7c0821d705fad562ff5b96613b7c7b248 (diff)
downloadgsoc2013-evolution-cf18d0940f9abbe8bb032d08a0fb33067def30d7.tar.gz
gsoc2013-evolution-cf18d0940f9abbe8bb032d08a0fb33067def30d7.tar.zst
gsoc2013-evolution-cf18d0940f9abbe8bb032d08a0fb33067def30d7.zip
Simplify. Use transfer_messages_to instead of picking between copy and
* 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. svn path=/trunk/; revision=16745
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c35
1 files changed, 1 insertions, 34 deletions
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);