aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/mail-callbacks.c16
2 files changed, 11 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a03d20b221..169c6a88cf 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -4,6 +4,8 @@
instead of mail_get_message().
(do_forward_non_attached): Fixed to work as a callback from
mail_get_messages().
+ (do_edit_messages): Only set the drafts_folder and drafts_uid if
+ the folder-browser is a drafts folder. Fixes bug #28863.
2002-08-09 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index e7e3e9497f..0172c675d9 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2278,15 +2278,12 @@ zoom_reset (BonoboUIComponent *uih, void *user_data, const char *path)
static void
do_edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
{
- /*FolderBrowser *fb = data;*/
+ FolderBrowser *fb = (FolderBrowser *) data;
int i;
if (messages == NULL)
return;
- /* Note: this folder is supposed to be a real Drafts folder,
- if it isn't then the user will lose these messages */
-
for (i = 0; i < messages->len; i++) {
struct _composer_callback_data *ccd;
EMsgComposer *composer;
@@ -2297,9 +2294,14 @@ do_edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, voi
if (composer) {
ccd = g_new (struct _composer_callback_data, 1);
- camel_object_ref (folder);
- ccd->drafts_folder = folder;
- ccd->drafts_uid = g_strdup (uids->pdata[i]);
+ if (folder_browser_is_drafts (fb)) {
+ camel_object_ref (folder);
+ ccd->drafts_folder = folder;
+ ccd->drafts_uid = g_strdup (uids->pdata[i]);
+ } else {
+ ccd->drafts_folder = NULL;
+ ccd->drafts_uid = NULL;
+ }
ccd->folder = NULL;
ccd->uid = NULL;
ccd->flags = 0;