[nautilus-sendto] Bug 582919 - Can't send attachments witn non ASCII filename through thunderbird.



commit 18433255d77ac80790e0efe93aac1336a8635484
Author: Christopher Aillon <caillon redhat com>
Date:   Fri Sep 11 18:08:07 2009 +0100

    Bug 582919 - Can't send attachments witn non ASCII filename through thunderbird.
    
    Properly quote the Thunderbird -compose argument as per:
    http://kb.mozillazine.org/Command_line_arguments_-_Thunderbird
    
    Specifically, the format we want is:
    thunderbird -compose "to='foo bar tld',attachment='file:///tmp/foo,file:///tmp/bar'"

 src/plugins/evolution/evolution.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/evolution/evolution.c b/src/plugins/evolution/evolution.c
index abb4cb1..dbb33b4 100644
--- a/src/plugins/evolution/evolution.c
+++ b/src/plugins/evolution/evolution.c
@@ -266,24 +266,24 @@ get_thunderbird_mailto (GtkWidget *contact_widget, GString *mailto, GList *file_
 {
 	GList *l;
 
-	g_string_append (mailto, "-compose ");
+	g_string_append (mailto, "-compose \"");
 	if (email != NULL) {
 		if (name != NULL)
-			g_string_append_printf (mailto, "to=\""CONTACT_FORMAT"\",", name, email);
+			g_string_append_printf (mailto, "to='"CONTACT_FORMAT"',", name, email);
 		else
-			g_string_append_printf (mailto, "to=%s,", email);
+			g_string_append_printf (mailto, "to='%s',", email);
 	} else {
 		const char *text;
 
 		text = gtk_entry_get_text (GTK_ENTRY (contact_widget));
 		if (text != NULL && *text != '\0')
-			g_string_append_printf (mailto, "to=\"%s\",", text);
+			g_string_append_printf (mailto, "to='%s',", text);
 	}
 	g_string_append_printf (mailto,"attachment='%s", (char *)file_list->data);
 	for (l = file_list->next ; l; l=l->next){
 		g_string_append_printf (mailto,",%s", (char *)l->data);
 	}
-	g_string_append_c (mailto, '\'');
+	g_string_append (mailto, "'\"");
 }
 
 static void



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