aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-05-14 00:15:55 +0800
committerDan Winship <danw@src.gnome.org>2002-05-14 00:15:55 +0800
commitb05542ec2dede738afe1e4dfdb583c822b98a09e (patch)
tree89d3c6f6b3fb92dca4e9bc93f802ecd780942339 /mail/mail-ops.c
parentc538852849865837c38a6603dcd4bf17124b03be (diff)
downloadgsoc2013-evolution-b05542ec2dede738afe1e4dfdb583c822b98a09e.tar.gz
gsoc2013-evolution-b05542ec2dede738afe1e4dfdb583c822b98a09e.tar.zst
gsoc2013-evolution-b05542ec2dede738afe1e4dfdb583c822b98a09e.zip
Update for camel_folder_append_message / camel_folder_transfer_messages_to
* (various places): Update for camel_folder_append_message / camel_folder_transfer_messages_to API change. * mail-ops.c (mail_append_mail): Pass the appended_uid to the callback. * mail-callbacks.c (composer_save_draft_cb, save_draft_done, do_edit_messages): Take advantage of the append_message change to keep track of the UID of the saved draft so that we can delete the old copy of the draft each time we save a new one. Remove the FIXME suggesting we should do that, since we're doing it now. :) svn path=/trunk/; revision=16766
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index a864b87569..c86c5f2208 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -558,7 +558,7 @@ mail_send_message (CamelMimeMessage *message, const char *destination,
}
if (folder) {
- camel_folder_append_message (folder, message, info, ex);
+ camel_folder_append_message (folder, message, info, NULL, ex);
if (camel_exception_is_set (ex)) {
ExceptionId id;
@@ -826,8 +826,9 @@ struct _append_msg {
CamelFolder *folder;
CamelMimeMessage *message;
CamelMessageInfo *info;
+ char *appended_uid;
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data);
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, char *appended_uid, void *data);
void *data;
};
@@ -843,7 +844,7 @@ append_mail_append (struct _mail_msg *mm)
struct _append_msg *m = (struct _append_msg *)mm;
camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- camel_folder_append_message(m->folder, m->message, m->info, &mm->ex);
+ camel_folder_append_message(m->folder, m->message, m->info, &m->appended_uid, &mm->ex);
}
static void
@@ -852,7 +853,7 @@ append_mail_appended (struct _mail_msg *mm)
struct _append_msg *m = (struct _append_msg *)mm;
if (m->done)
- m->done(m->folder, m->message, m->info, !camel_exception_is_set(&mm->ex), m->data);
+ m->done(m->folder, m->message, m->info, !camel_exception_is_set(&mm->ex), m->appended_uid, m->data);
}
static void
@@ -873,7 +874,7 @@ static struct _mail_msg_op append_mail_op = {
void
mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data),
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, char *appended_uid, void *data),
void *data)
{
struct _append_msg *m;
@@ -938,7 +939,7 @@ transfer_messages_transfer (struct _mail_msg *mm)
camel_folder_freeze (m->source);
camel_folder_freeze (dest);
- camel_folder_transfer_messages_to (m->source, m->uids, dest, m->delete, &mm->ex);
+ camel_folder_transfer_messages_to (m->source, m->uids, dest, NULL, m->delete, &mm->ex);
camel_folder_thaw (m->source);
camel_folder_thaw (dest);