From 641d82a10bd69bef33837876bcc63a69ab81e6c2 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Sat, 15 Nov 2003 00:33:30 +0000 Subject: [PATCH] * src/mimeview.c fix a couple of problems that treated application/* and application/octet-stream the wrong way around (since 0.9.6claws10), causing "Open" to do nothing. --- ChangeLog.claws | 6 ++++++ configure.ac | 2 +- src/mimeview.c | 10 ++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index ff5e388b4..faad7271c 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2003-11-14 [luke] 0.9.6claws75 + * src/mimeview.c + fix a couple of problems that treated application/* and + application/octet-stream the wrong way around + (since 0.9.6claws10), causing "Open" to do nothing. + 2003-11-14 [christoph] 0.9.6claws74 * src/messageview.c diff --git a/configure.ac b/configure.ac index 674088826..d2588906e 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=74 +EXTRA_VERSION=75 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 b285a704d..98601fb7d 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -494,8 +494,8 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar * gint i = 0; while (curfactory->content_types[i] != NULL) { - debug_print("%s\n", curfactory->content_types[i]); if(!fnmatch(curfactory->content_types[i], content_type, FNM_CASEFOLD)) { + debug_print("%s\n", curfactory->content_types[i]); factory = curfactory; break; } @@ -528,7 +528,7 @@ static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinf MimeViewer *viewer = NULL; if ((partinfo->type == MIMETYPE_APPLICATION) && - (g_strcasecmp(partinfo->subtype, "octet-stream")) && + (!g_strcasecmp(partinfo->subtype, "octet-stream")) && (partinfo->name != NULL)) { content_type = procmime_get_mime_type(partinfo->name); } else { @@ -782,7 +782,8 @@ static void part_button_pressed(MimeView *mimeview, GdkEventButton *event, menu_set_sensitive(mimeview->popupfactory, "/Display as text", TRUE); if (partinfo && - partinfo->type == MIMETYPE_APPLICATION) + partinfo->type == MIMETYPE_APPLICATION && + !g_strcasecmp(partinfo->subtype, "octet-stream")) menu_set_sensitive(mimeview->popupfactory, "/Open", FALSE); else @@ -1154,7 +1155,8 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo, if (cmdline) { cmd = cmdline; def_cmd = NULL; - } else if (MIMETYPE_APPLICATION == partinfo->type) { + } else if (MIMETYPE_APPLICATION == partinfo->type && + !g_strcasecmp(partinfo->subtype, "octet-stream")) { return; } else if (MIMETYPE_IMAGE == partinfo->type) { cmd = prefs_common.mime_image_viewer; -- 2.25.1