0.8.11claws48
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 25 Mar 2003 23:35:47 +0000 (23:35 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 25 Mar 2003 23:35:47 +0000 (23:35 +0000)
* src/mimeview.c
* src/procmime.c
        remove mime type guessing from mime parser and use
        name based mime types in viewer lookup for mime type
        application/octet-stream

ChangeLog.claws
configure.ac
src/mimeview.c
src/procmime.c

index eae6cb1..27b31a7 100644 (file)
@@ -1,4 +1,12 @@
-2003-03-25 [christop]  0.8.11claws47
+2003-03-25 [christoph] 0.8.11claws48
+
+       * src/mimeview.c
+       * src/procmime.c
+               remove mime type guessing from mime parser and use
+               name based mime types in viewer lookup for mime type
+               application/octet-stream
+
+2003-03-25 [christoph] 0.8.11claws47
 
        * doc-src/readme.txt
        * doc-src/rfc2554.txt
index c212378..b3964cc 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws47
+EXTRA_VERSION=claws48
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 7f47500..7d7ddf6 100644 (file)
@@ -508,11 +508,29 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar *
        return viewer;
 }
 
+static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinfo)
+{
+       gchar *content_type = NULL;
+       MimeViewer *viewer;
+
+       if ((partinfo->mime_type == MIME_APPLICATION_OCTET_STREAM) &&
+           (partinfo->name != NULL)) {
+               content_type = procmime_get_mime_type(partinfo->name);
+       } else {
+               content_type = g_strdup(partinfo->content_type);
+       }
+
+       viewer = get_viewer_for_content_type(mimeview, content_type);
+       g_free(content_type);
+
+       return viewer;
+}
+
 static gboolean mimeview_show_part(MimeView *mimeview, MimeInfo *partinfo)
 {
        MimeViewer *viewer;
        
-       viewer = get_viewer_for_content_type(mimeview, partinfo->content_type);
+       viewer = get_viewer_for_mimeinfo(mimeview, partinfo);
        if (viewer == NULL) {
                if (mimeview->mimeviewer != NULL)
                        mimeview->mimeviewer->clear_viewer(mimeview->mimeviewer);
index e7945a7..24dd3a1 100644 (file)
@@ -567,14 +567,6 @@ MimeInfo *procmime_scan_mime_header(FILE *fp)
                }
        }
 
-       if (mimeinfo->mime_type == MIME_APPLICATION_OCTET_STREAM &&
-           mimeinfo->name) {
-               const gchar *type;
-               type = procmime_get_mime_type(mimeinfo->name);
-               if (type)
-                       mimeinfo->mime_type = procmime_scan_mime_type(type);
-       }
-
        if (!mimeinfo->content_type)
                        mimeinfo->content_type = g_strdup("text/plain");