From 72414d1f59cc55df5e4180a362748de16d7dc4d7 Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Fri, 21 Nov 2003 17:06:02 +0000 Subject: [PATCH] 0.9.6claws85 * src/mimeview.c fix content-type guessing by name parameter when finding the correct viewer --- ChangeLog.claws | 8 +++++++- configure.ac | 2 +- src/mimeview.c | 9 ++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 8ee304c89..ce702cfa1 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,9 +1,15 @@ +2003-11-21 [christoph] 0.9.6claws85 + + * src/mimeview.c + fix content-type guessing by name parameter when finding + the correct viewer + 2003-11-21 [alfons] 0.9.6claws84 * src/main.c no mail incorporation allowed with --offline param. fixes bug #374, "--offline ignored" - + 2003-11-20 [christoph] 0.9.6claws83 * src/mimeinfo.c diff --git a/configure.ac b/configure.ac index 3999de510..95ff0ab68 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=6 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=84 +EXTRA_VERSION=85 if test $EXTRA_VERSION -eq 0; then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws else diff --git a/src/mimeview.c b/src/mimeview.c index 13e01b649..3f5b7811d 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -528,9 +528,12 @@ static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinf MimeViewer *viewer = NULL; if ((partinfo->type == MIMETYPE_APPLICATION) && - (!g_strcasecmp(partinfo->subtype, "octet-stream")) && - (partinfo->name != NULL)) { - content_type = procmime_get_mime_type(partinfo->name); + (!g_strcasecmp(partinfo->subtype, "octet-stream"))) { + const gchar *filename; + + filename = procmime_mimeinfo_get_parameter(partinfo, "name"); + if (filename != NULL) + content_type = procmime_get_mime_type(filename); } else { content_type = g_strdup_printf("%s/%s", procmime_get_type_str(partinfo->type), partinfo->subtype); } -- 2.25.1