Re: [evolution-patches] "Forward" option in the command-line



On Mon, 2005-06-27 at 10:24 +0800, Not Zed wrote:
> The style could use some work, see HACKING. In particular note the line
> 'copy surrounding code'.
> 
Hmm.. read through those lines.  Hope the attached patch adhere to it.

> Also, we really dont want to override the default forwarding style
> because of some external application!  Definitely dont set any gconf
> settings here!!!  Use the proper forwarding apis.
> 
It is still "evolution" that overrides the default forwarding style,
however, I have modified the patch according to your suggestion to use
the proper forwarding APIs.

The command-line option and its parameter values remains same.

Let me know your further comments/suggestions about/on the patch.

Thanks,

V. Varadhan

> On Fri, 2005-06-24 at 22:37 +0530, Veerapuram Varadhan wrote:
> > Hi,
> > 
> > Attached patch adds the ability to "forward" a mail from command-line
> > like "reply".
> > 
> > The new parameter takes the following values:
> > "quoted"
> > "inline"
> > "attached"
> > 
> > The command-line syntax is:
> > evolution
> > 'email://1118659289 31725 12 vvaradhan-test/Calendar;uid=424;forward=quoted'
> > 
> > The default value is "attached".
> > 
> > Kindly let me know your comments/suggestions.
> > 
> > Thanks,
> > 
> > V. Varadhan
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> 
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3649
diff -u -p -r1.3649 ChangeLog
--- mail/ChangeLog	1 Jul 2005 03:29:22 -0000	1.3649
+++ mail/ChangeLog	4 Jul 2005 08:55:01 -0000
@@ -1,3 +1,8 @@
+2005-07-04  Veerapuram Varadhan <vvaradhan novell com>
+
+	* mail-component.c: (handleuri_got_folder): Added "forward"
+	command-line option.
+	
 2005-06-24	Matt Brown	<matt mattb net nz>
 
 	* em-inline-filter.c: implement extraction of inline signed/encrypted pgp
Index: mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.120
diff -u -p -r1.120 mail-component.c
--- mail/mail-component.c	23 Jun 2005 09:11:06 -0000	1.120
+++ mail/mail-component.c	4 Jul 2005 08:55:30 -0000
@@ -821,9 +821,10 @@ handleuri_got_folder(char *uri, CamelFol
 
 	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,24 @@ handleuri_got_folder(char *uri, CamelFol
 				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");
+			g_assert(uid != NULL);
+
+			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_attached(folder, uids, uri);
 		} else {
 			emmb = (EMMessageBrowser *)em_message_browser_window_new();
 			/*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]