GNOME Bugzilla – Bug 510182
nautilus-sendto does not send thru thunderbird (with patch)
Last modified: 2008-01-20 13:44:47 UTC
Please describe the problem: Using nautilus-sendto plugin it is not possible send thru mozilla thunderbird. Patch is against verion 0.7 but shoudl be applicable also at 0.12. It only includes compose argument in quotes and removes URL prefix file:///. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: --- nautilus-sendto-0.7/src/plugins/thunderbird.c.thunderbird 2006-05-27 20:52:27.000000000 -0400 +++ nautilus-sendto-0.7/src/plugins/thunderbird.c 2006-09-16 02:16:30.000000000 -0400 @@ -35,7 +35,7 @@ printf ("Init thunderbird plugin\n"); hash = g_hash_table_new (g_str_hash, g_str_equal); - t_cmd = g_find_program_in_path ("mozilla-thunderbird"); + t_cmd = g_find_program_in_path ("thunderbird"); if (t_cmd == NULL) return FALSE; return TRUE; @@ -73,24 +73,26 @@ send_to = (gchar *) gtk_entry_get_text (GTK_ENTRY(contact_widget)); if (send_to == NULL || strlen (send_to) == 0) { - mailto = g_string_new("-compose "); + mailto = g_string_new("-compose \""); } else { - mailto = g_string_new("-compose "); + mailto = g_string_new("-compose \""); g_string_append_printf (mailto, "to=%s,", send_to); } - t_cmd = g_find_program_in_path ("mozilla-thunderbird"); + t_cmd = g_find_program_in_path ("thunderbird"); if (t_cmd == NULL) return FALSE; - g_string_append_printf (mailto," attachment='\"%s\"'",file_list->data); + g_string_append_printf (mailto,"attachment='%s",file_list->data); for (l = file_list->next ; l; l=l->next){ - g_string_append_printf (mailto,",'\"%s\"'",l->data); + g_string_append_printf (mailto,",%s",l->data); } + g_string_append_c (mailto, '\''); + g_string_append_c (mailto, '"'); cmd = g_strdup_printf ("%s %s", t_cmd, mailto->str); g_spawn_command_line_async (cmd, NULL); g_free (cmd);
I forget to mention that this fix is only needed if sending multiple files or files whose name includes some special letters (e.g. accents etc.). Sending one file works OK.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 356258 ***