aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-11-16 08:36:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-11-16 08:36:07 +0800
commit64f95feb7da6e02faf8395f14a1329a133e367cd (patch)
treeb0612e7e233e5b25eb0df5f680b8df786dec6022 /mail/mail-callbacks.c
parent302c05b4af296d2a412387717a47876aa6af290a (diff)
downloadgsoc2013-evolution-64f95feb7da6e02faf8395f14a1329a133e367cd.tar.gz
gsoc2013-evolution-64f95feb7da6e02faf8395f14a1329a133e367cd.tar.zst
gsoc2013-evolution-64f95feb7da6e02faf8395f14a1329a133e367cd.zip
Added a new Forward as Attachment bonobo menu item verb.
2000-11-15 Jeffrey Stedfast <fejj@helixcode.com> * 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
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c37
1 files changed, 30 insertions, 7 deletions
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,7 +921,7 @@ 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);
@@ -920,6 +929,20 @@ configure_folder(BonoboUIComponent *uih, void *user_data, const char *path)
}
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)
{
FolderBrowser *fb = user_data;