Commit cae25657 authored by Jeffrey Stedfast's avatar Jeffrey Stedfast Committed by Jeffrey Stedfast

Updated to reflect changes made to the move/copy API in camel-folder.c

2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-ops.c (transfer_messages_transfer): Updated to reflect
	changes made to the move/copy API in camel-folder.c

	* mail-local.c (reconfigure_folder_reconfigure): Updated this too.

svn path=/trunk/; revision=8961
parent efddd51d
2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (transfer_messages_transfer): Updated to reflect
changes made to the move/copy API in camel-folder.c
* mail-local.c (reconfigure_folder_reconfigure): Updated this too.
2001-03-20 Not Zed <NotZed@Ximian.com>
* mail-local.c (init_trash): Fixed vfolder_new api.
......
......@@ -903,18 +903,14 @@ reconfigure_folder_reconfigure(struct _mail_msg *mm)
goto cleanup;
}
update_progress(_("Copying messages"), 0.0);
uids = camel_folder_get_uids(fromfolder);
for (i=0;i<uids->len;i++) {
mail_statusf("Copying message %d of %d", i, uids->len);
camel_folder_move_message_to(fromfolder, uids->pdata[i], tofolder, &mm->ex);
if (camel_exception_is_set(&mm->ex)) {
camel_folder_free_uids(fromfolder, uids);
goto cleanup;
}
}
camel_folder_free_uids(fromfolder, uids);
camel_folder_expunge(fromfolder, &mm->ex);
update_progress (_("Copying messages"), 0.0);
uids = camel_folder_get_uids (fromfolder);
camel_folder_move_messages_to (fromfolder, uids, tofolder, &mm->ex);
camel_folder_free_uids (fromfolder, uids);
if (camel_exception_is_set(&mm->ex))
goto cleanup;
camel_folder_expunge (fromfolder, &mm->ex);
d(printf("delete old mbox ...\n"));
camel_store_delete_folder(fromstore, tmpname, &mm->ex);
......
......@@ -838,15 +838,15 @@ static void transfer_messages_transfer(struct _mail_msg *mm)
CamelFolder *dest;
int i;
char *desc;
void (*func) (CamelFolder *, const char *,
void (*func) (CamelFolder *, GPtrArray *,
CamelFolder *,
CamelException *);
if (m->delete) {
func = camel_folder_move_message_to;
func = camel_folder_move_messages_to;
desc = _("Moving");
} else {
func = camel_folder_copy_message_to;
func = camel_folder_copy_messages_to;
desc = _("Copying");
}
......@@ -856,16 +856,9 @@ static void transfer_messages_transfer(struct _mail_msg *mm)
camel_folder_freeze (m->source);
camel_folder_freeze (dest);
for (i = 0; i < m->uids->len; i++) {
mail_statusf(_("%s message %d of %d (uid \"%s\")"), desc,
i + 1, m->uids->len, (char *)m->uids->pdata[i]);
(func) (m->source, m->uids->pdata[i], dest, &mm->ex);
if (camel_exception_is_set (&mm->ex))
break;
}
(func) (m->source, m->uids->pdata[i], dest, &mm->ex);
camel_folder_thaw(m->source);
camel_folder_thaw(dest);
camel_object_unref((CamelObject *)dest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment