From 64f95feb7da6e02faf8395f14a1329a133e367cd Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 16 Nov 2000 00:36:07 +0000 Subject: Added a new Forward as Attachment bonobo menu item verb. 2000-11-15 Jeffrey Stedfast * folder-browser-factory.c: Added a new Forward as Attachment bonobo menu item verb. * mail-view.c (view_forward_msg): Updated to reflect changes to mail_do_forward_message(). It now forwards the message without attaching it - is this what we want? * mail-ops.c (mail_do_view_message_sources): New async function to display message source dialog windows. (setup_forward_messages): If we were asked not to forward the message(s) as attachment(s) and the user chose more than a single message, then default to making each message an attachment. (cleanup_forward_messages): If we aren't forwarding the message as an attachment, then quote the text and set the composer's body with it. * mail-callbacks.c (view_source): New callback to view the message source of all messages that are currently selected. (forward_attach): New callback to forward a message as an attachment (forward_msg is now for forwarding a message without it being an attachment). (forward_message): Convenience function for forwarding messages. svn path=/trunk/; revision=6585 --- mail/mail-callbacks.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 6581463c88..8286735f5b 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -483,11 +483,9 @@ enumerate_msg (MessageList *ml, const char *uid, gpointer data) g_ptr_array_add ((GPtrArray *) data, g_strdup (uid)); } - -void -forward_msg (GtkWidget *widget, gpointer user_data) +static void +forward_message (FolderBrowser *fb, gboolean attach) { - FolderBrowser *fb = FOLDER_BROWSER (user_data); EMsgComposer *composer; CamelMimeMessage *cursor_msg; GPtrArray *uids; @@ -510,8 +508,19 @@ forward_msg (GtkWidget *widget, gpointer user_data) mail_do_forward_message (cursor_msg, fb->message_list->folder, - uids, - composer); + uids, composer, attach); +} + +void +forward_msg (GtkWidget *widget, gpointer user_data) +{ + forward_message (FOLDER_BROWSER (user_data), FALSE); +} + +void +forward_attach (GtkWidget *widget, gpointer user_data) +{ + forward_message (FOLDER_BROWSER (user_data), TRUE); } static void @@ -912,13 +921,27 @@ manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path) } void -configure_folder(BonoboUIComponent *uih, void *user_data, const char *path) +configure_folder (BonoboUIComponent *uih, void *user_data, const char *path) { FolderBrowser *fb = FOLDER_BROWSER(user_data); local_reconfigure_folder(fb); } +void +view_source (GtkWidget *widget, gpointer user_data) +{ + FolderBrowser *fb = user_data; + GPtrArray *uids; + + if (!fb->folder) + return; + + uids = g_ptr_array_new (); + message_list_foreach (fb->message_list, enumerate_msg, uids); + mail_do_view_message_sources (fb->folder, uids, fb); +} + void view_msg (GtkWidget *widget, gpointer user_data) { -- cgit