aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component.c
diff options
context:
space:
mode:
authorVeerapuram Varadhan <vvaradan@src.gnome.org>2005-07-06 00:30:22 +0800
committerVeerapuram Varadhan <vvaradan@src.gnome.org>2005-07-06 00:30:22 +0800
commit76e2be74ffaf855a1c79132cb36a635c642be8b4 (patch)
tree088b1a28f8b1bd6fd839a0e4b54f6e48b19999b3 /mail/mail-component.c
parent3fd1fe0a663ea89de54fc40fd157c5047d0c0d63 (diff)
downloadgsoc2013-evolution-76e2be74ffaf855a1c79132cb36a635c642be8b4.tar.gz
gsoc2013-evolution-76e2be74ffaf855a1c79132cb36a635c642be8b4.tar.zst
gsoc2013-evolution-76e2be74ffaf855a1c79132cb36a635c642be8b4.zip
Added "forward" command-line option for mails.
* Added "forward" command-line option for mails. svn path=/trunk/; revision=29639
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r--mail/mail-component.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c
index be881b1fa6..ac6453de28 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -821,9 +821,10 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
if (folder != NULL) {
const char *reply = camel_url_get_param(url, "reply");
+ const char *forward = camel_url_get_param(url, "forward");
+ int mode;
if (reply) {
- int mode;
if (!strcmp(reply, "all"))
mode = REPLY_MODE_ALL;
@@ -833,6 +834,27 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
mode = REPLY_MODE_SENDER;
em_utils_reply_to_message(folder, camel_url_get_param(url, "uid"), NULL, mode, NULL);
+ } else if (forward) {
+ GPtrArray *uids;
+ const char* uid;
+
+ uid = camel_url_get_param(url, "uid");
+ if (uid == NULL)
+ g_warning("Could not forward the message. UID is NULL.");
+ else {
+ uids = g_ptr_array_new();
+ g_ptr_array_add(uids, g_strdup(uid));
+
+ if (!strcmp(forward, "attached"))
+ em_utils_forward_attached(folder, uids, uri);
+ else if (!strcmp(forward, "inline"))
+ em_utils_forward_inline(folder, uids, uri);
+ else if (!strcmp(forward, "quoted"))
+ em_utils_forward_quoted(folder, uids, uri);
+ else { /* Just the default forward */
+ em_utils_forward_messages(folder, uids, uri);
+ }
+ }
} else {
emmb = (EMMessageBrowser *)em_message_browser_window_new();
/*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/