On 12/03/2009 09:05 PM, Jie Zhang wrote:
On 12/03/2009 08:21 PM, Bernd Schmidt wrote:
Jie Zhang wrote:
I now have got my thunderbird show your patches inline. So you need not
bother to do the magic. :-D

But please do share the Thunderbird magic.

The patches are attached. You need to rebuild Thunderbird with the patch
for the distribution you use. I'm using Thunderbird 3. So I didn't test
thunderbird 2. But I think it should also work.

If you use thunderbird2, apply thunderbird2-mime.diff.
If you use thunderbird3, apply thunderbird-mime.diff.

I have reported the bug and the patch to Mozilla.

Just FYI. Thunderbird 3.1 will contain this patch, which will be out late March or early April.


Jie


thunderbird2-mime.diff


--- mailnews/mime/src/mimei.cpp.orig    2009-12-03 20:52:29.000000000 +0800
+++ mailnews/mime/src/mimei.cpp 2009-12-03 20:54:20.000000000 +0800
@@ -838,16 +838,7 @@ mime_create (const char *content_type, M
        // file name, lets do some better checking not to inline something bad
        //
        if (override_content_type&&  (nsCRT::strcasecmp(override_content_type, 
UNKNOWN_CONTENT_TYPE)))
-      {
-        // Only inline this if it makes sense to do so!
-        if ( (!content_type) ||
-             (content_type&&  (!nsCRT::strcasecmp(content_type, 
UNKNOWN_CONTENT_TYPE))) )
-        {
-                       content_type = override_content_type;
-        }
-        else
-          PR_FREEIF(override_content_type);
-      }
+        content_type = override_content_type;
                }
        }



thunderbird-mime.diff


diff -r e7199a17fcc4 mailnews/mime/src/mimei.cpp
--- a/mailnews/mime/src/mimei.cpp       Wed Dec 02 18:16:57 2009 +0100
+++ b/mailnews/mime/src/mimei.cpp       Thu Dec 03 17:13:56 2009 +0800
@@ -858,26 +858,17 @@ mime_create (const char *content_type, M
      {
        override_content_type = opts->file_type_fn (name, opts->stream_closure);
        PR_FREEIF(name);

        // Of, if we got here and it is not the unknown content type from the
        // file name, lets do some better checking not to inline something bad
        //
        if (override_content_type&&  (PL_strcasecmp(override_content_type, 
UNKNOWN_CONTENT_TYPE)))
-      {
-        // Only inline this if it makes sense to do so!
-        if ( (!content_type) ||
-             (content_type&&  (!PL_strcasecmp(content_type, 
UNKNOWN_CONTENT_TYPE))) )
-        {
-          content_type = override_content_type;
-        }
-        else
-          PR_FREEIF(override_content_type);
-      }
+        content_type = override_content_type;
      }
    }

    clazz = mime_find_class(content_type, hdrs, opts, PR_FALSE);

    NS_ASSERTION(clazz, "1.1<r...@netscape.com>  19 Mar 1999 12:00");
    if (!clazz) goto FAIL;


_______________________________________________
Toolchain-devel mailing list
Toolchain-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/toolchain-devel

Reply via email to