aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-13 03:36:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-13 03:36:44 +0800
commited7a3070c6d8fec534138da9a4e148420bbc9a6e (patch)
tree84320f81bd23dacdd6f861d77850a3134566b560 /mail
parent91af6345792cb2824f714df5249d5fc4c035f783 (diff)
downloadgsoc2013-evolution-ed7a3070c6d8fec534138da9a4e148420bbc9a6e.tar.gz
gsoc2013-evolution-ed7a3070c6d8fec534138da9a4e148420bbc9a6e.tar.zst
gsoc2013-evolution-ed7a3070c6d8fec534138da9a4e148420bbc9a6e.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(). svn path=/trunk/; revision=17761
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-callbacks.c59
2 files changed, 35 insertions, 31 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 91a9818e97..a03d20b221 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+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().
+
2002-08-09 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (save_draft_done): If the ccd is NULL, create a
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 3a1d52d697..e7e3e9497f 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1377,36 +1377,41 @@ forward_get_composer (CamelMimeMessage *message, const char *subject)
}
static void
-do_forward_non_attached (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *data)
+do_forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
{
MailConfigForwardStyle style = GPOINTER_TO_INT (data);
+ CamelMimeMessage *message;
char *subject, *text;
+ int i;
- if (!message)
+ if (messages->len == 0)
return;
- subject = mail_tool_generate_forward_subject (message);
- text = mail_tool_forward_message (message, style == MAIL_CONFIG_FORWARD_QUOTED);
-
- if (text) {
- EMsgComposer *composer = forward_get_composer (message, subject);
- if (composer) {
- CamelDataWrapper *wrapper;
-
- e_msg_composer_set_body_text (composer, text);
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (CAMEL_IS_MULTIPART (wrapper))
- e_msg_composer_add_message_attachments (composer, message, FALSE);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
+ for (i = 0; i < messages->len; i++) {
+ message = messages->pdata[i];
+ subject = mail_tool_generate_forward_subject (message);
+ text = mail_tool_forward_message (message, style == MAIL_CONFIG_FORWARD_QUOTED);
+
+ if (text) {
+ EMsgComposer *composer = forward_get_composer (message, subject);
+ if (composer) {
+ CamelDataWrapper *wrapper;
+
+ e_msg_composer_set_body_text (composer, text);
+
+ wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
+ if (CAMEL_IS_MULTIPART (wrapper))
+ e_msg_composer_add_message_attachments (composer, message, FALSE);
+
+ gtk_widget_show (GTK_WIDGET (composer));
+ e_msg_composer_unset_changed (composer);
+ e_msg_composer_drop_editor_undo (composer);
+ }
+ g_free (text);
}
- g_free (text);
+
+ g_free (subject);
}
-
- g_free (subject);
}
static void
@@ -1424,15 +1429,7 @@ forward_message (FolderBrowser *fb, MailConfigForwardStyle style)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- for (i = 0; i < uids->len; i++) {
- mail_get_message (fb->folder, uids->pdata[i],
- do_forward_non_attached,
- GINT_TO_POINTER (style),
- mail_thread_new);
- g_free (uids->pdata[i]);
- }
-
- g_ptr_array_free (uids, TRUE);
+ mail_get_messages (fb->folder, uids, do_forward_non_attached, GINT_TO_POINTER (style));
}
void