aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-13 04:14:16 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-13 04:14:16 +0800
commitf3e71a93f56b1d14768059114df2fd3978f5abfb (patch)
treec55a5fdc34cd88ef9075cc59790ff2ac935db222 /mail/mail-callbacks.c
parented7a3070c6d8fec534138da9a4e148420bbc9a6e (diff)
downloadgsoc2013-evolution-f3e71a93f56b1d14768059114df2fd3978f5abfb.tar.gz
gsoc2013-evolution-f3e71a93f56b1d14768059114df2fd3978f5abfb.tar.zst
gsoc2013-evolution-f3e71a93f56b1d14768059114df2fd3978f5abfb.zip
Use mail_get_messages() instead of mail_get_message().
2002-08-12 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (forward_message): Use mail_get_messages() 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. svn path=/trunk/; revision=17762
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c16
1 files changed, 9 insertions, 7 deletions
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;