* src/mimeview.c
authorLuke Plant <L.Plant.98@cantab.net>
Sat, 15 Nov 2003 00:33:30 +0000 (00:33 +0000)
committerLuke Plant <L.Plant.98@cantab.net>
Sat, 15 Nov 2003 00:33:30 +0000 (00:33 +0000)
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
configure.ac
src/mimeview.c

index ff5e388..faad727 100644 (file)
@@ -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
index 6740888..d258890 100644 (file)
@@ -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
index b285a70..98601fb 100644 (file)
@@ -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;