From 3b87b4b2736550cc66c76f5ebb545d307f4d94ee Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 16 Feb 2002 00:33:14 +0000 Subject: Don't display a down-arrow if the attachment is undisplayable. Fixes bug 2002-02-15 Jeffrey Stedfast * mail-display.c (do_attachment_header): Don't display a down-arrow if the attachment is undisplayable. Fixes bug #6919. (launch_cb): Some programs are buggy when it comes to parsing file: uris, so make sure we do file://%s. Fixes bug #20456. svn path=/trunk/; revision=15747 --- mail/mail-display.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mail/mail-display.c') diff --git a/mail/mail-display.c b/mail/mail-display.c index 98f083d1f1..bc74557618 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -307,8 +307,7 @@ launch_cb (GtkWidget *widget, gpointer user_data) tmpdir = e_mkdtemp ("evolution.XXXXXX"); if (!tmpdir) { - char *msg = g_strdup_printf (_("Could not create temporary " - "directory: %s"), + char *msg = g_strdup_printf (_("Could not create temporary directory: %s"), g_strerror (errno)); gnome_error_dialog (msg); g_free (msg); @@ -318,16 +317,21 @@ launch_cb (GtkWidget *widget, gpointer user_data) filename = make_safe_filename (tmpdir, part); if (!write_data_to_file (part, filename, TRUE)) { + char *msg = g_strdup_printf (_("Could not create temporary file '%s': %s"), + filename, g_strerror (errno)); + gnome_error_dialog (msg); g_free (filename); + g_free (msg); return; } command = g_strdup_printf ("%s %s%s &", app->command, - app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS ? "file:" : "", + app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS ? "file://" : "", filename); + g_free (filename); + system (command); g_free (command); - g_free (filename); } static void -- cgit