Don't display a down-arrow if the attachment is undisplayable. Fixes bug

2002-02-15  Jeffrey Stedfast  <fejj@ximian.com>

	* 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
This commit is contained in:
Jeffrey Stedfast
2002-02-16 00:33:14 +00:00
committed by Jeffrey Stedfast
parent cf668bd306
commit 3b87b4b273
2 changed files with 10 additions and 4 deletions

View File

@ -2,6 +2,8 @@
* mail-display.c (do_attachment_header): Don't display a * mail-display.c (do_attachment_header): Don't display a
down-arrow if the attachment is undisplayable. Fixes bug #6919. 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.
2002-02-14 Jeffrey Stedfast <fejj@ximian.com> 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>

View File

@ -307,8 +307,7 @@ launch_cb (GtkWidget *widget, gpointer user_data)
tmpdir = e_mkdtemp ("evolution.XXXXXX"); tmpdir = e_mkdtemp ("evolution.XXXXXX");
if (!tmpdir) { if (!tmpdir) {
char *msg = g_strdup_printf (_("Could not create temporary " char *msg = g_strdup_printf (_("Could not create temporary directory: %s"),
"directory: %s"),
g_strerror (errno)); g_strerror (errno));
gnome_error_dialog (msg); gnome_error_dialog (msg);
g_free (msg); g_free (msg);
@ -318,16 +317,21 @@ launch_cb (GtkWidget *widget, gpointer user_data)
filename = make_safe_filename (tmpdir, part); filename = make_safe_filename (tmpdir, part);
if (!write_data_to_file (part, filename, TRUE)) { 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 (filename);
g_free (msg);
return; return;
} }
command = g_strdup_printf ("%s %s%s &", app->command, 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); filename);
g_free (filename);
system (command); system (command);
g_free (command); g_free (command);
g_free (filename);
} }
static void static void