aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-vee-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-vee-folder.c')
-rw-r--r--camel/camel-vee-folder.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 7ccaae72ab..785d70b057 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -54,7 +54,8 @@ static void vee_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
static void vee_expunge (CamelFolder *folder, CamelException *ex);
static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static void vee_move_messages_to(CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex);
+static void vee_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex);
+static void vee_transfer_messages_to(CamelFolder *source, GPtrArray *uids, CamelFolder *dest, gboolean delete_originals, CamelException *ex);
static GPtrArray *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
static GPtrArray *vee_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex);
@@ -123,7 +124,8 @@ camel_vee_folder_class_init (CamelVeeFolderClass *klass)
folder_class->expunge = vee_expunge;
folder_class->get_message = vee_get_message;
- folder_class->move_messages_to = vee_move_messages_to;
+ folder_class->append_message = vee_append_message;
+ folder_class->transfer_messages_to = vee_transfer_messages_to;
folder_class->search_by_expression = vee_search_by_expression;
folder_class->search_by_uids = vee_search_by_uids;
@@ -730,29 +732,15 @@ vee_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name
}
static void
-vee_move_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
+vee_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex)
{
- CamelVeeMessageInfo *mi;
- int i;
-
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++) {
- mi = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, uids->pdata[i]);
- if (mi) {
- /* noop if it we're moving from the same vfolder (uh, which should't happen but who knows) */
- if (folder != mi->folder) {
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- g_ptr_array_add (uids, (char *) (camel_message_info_uid (mi) + 8));
- camel_folder_move_messages_to (mi->folder, uids, dest, ex);
- g_ptr_array_free (uids, TRUE);
- }
- camel_folder_summary_info_free (folder->summary, (CamelMessageInfo *)mi);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("No such message: %s"), uids->pdata[i]);
- }
- }
+ camel_exception_set(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot copy or move messages into a Virtual Folder"));
+}
+
+static void
+vee_transfer_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, gboolean delete_originals, CamelException *ex)
+{
+ camel_exception_set(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot copy or move messages into a Virtual Folder"));
}
static void vee_rename(CamelFolder *folder, const char *new)