Re: [evolution-patches] patch to support 'attachment'



On Tue, 2004-08-17 at 11:36 +0100, Michael Meeks wrote:
Hi there,

	Since this is badly/un-specified; I'd like to support the
'attachment=<uri>' syntax for this, since this makes cross-desktop, and
cross-mozilla/evo standardisation easier here.

	A trivial patch appended; to what branch(es) would one commit
hypothetically ?

The one it was made against, usually :)

Trunk is the right place at the moment, and it looks good.

Oh, while you're there, the strcasecmp check for "file:" must be changed to g_ascii_strcasecmp() ('i' is about the only character that strcasecmp ever changes for, in Turkish).

Note that the code will only handle file url's or unix paths, but thats another issue.

	Thanks,

		Michael.

Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.656
diff -u -r1.656 ChangeLog
--- composer/ChangeLog	12 Aug 2004 20:36:07 -0000	1.656
+++ composer/ChangeLog	17 Aug 2004 11:13:48 -0000
@@ -1,3 +1,8 @@
+2004-08-17  Michael Meeks  <michael ximian com>
+
+	* e-msg-composer.c (handle_mailto): handle 'attachment' as
+	well, as per Mozilla's mangling, and the new desktop-launch spec.
+
 2004-07-29  Carlos Garnacho Parro  <carlosg gnome org>
 
 	* e-msg-composer-select-file.[ch]: Optionally use GtkFileChooser
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.478
diff -u -r1.478 e-msg-composer.c
--- composer/e-msg-composer.c	12 Aug 2004 20:36:07 -0000	1.478
+++ composer/e-msg-composer.c	17 Aug 2004 11:13:58 -0000
@@ -4167,7 +4167,8 @@
 						body[nwritten] = '\0';
 					}
 				}
-			} else if (!g_ascii_strcasecmp (header, "attach")) {
+			} else if (!g_ascii_strcasecmp (header, "attach") ||
+				   !g_ascii_strcasecmp (header, "attachment")) {
 				/* Change file url to absolute path */
 				if (!strncasecmp (content, "file:", 5)) {
 					url = "" (content, NULL);


--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


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