[balsa] Workaround for non-IANA mime-type
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] Workaround for non-IANA mime-type
- Date: Sat, 1 Aug 2009 21:32:40 +0000 (UTC)
commit de8a553d5fdbc843fc1f48cb34d27d6898e5a617
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sat Aug 1 17:32:24 2009 -0400
Workaround for non-IANA mime-type
ChangeLog | 6 ++++++
libbalsa/body.c | 9 +++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 225e2f0..93cdd73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-08-01 Peter Bloomfield
+ * libbalsa/body.c (libbalsa_message_body_get_pixbuf): workaround
+ for IE's use of non-IANA registered mime-type "image/pjpeg" for
+ progressive JPEG image.
+
+2009-08-01 Peter Bloomfield
+
* src/sendmsg-window.c (set_entry_to_subject): do not drop
subject when continuing a new message.
diff --git a/libbalsa/body.c b/libbalsa/body.c
index 3883377..0cf60ed 100644
--- a/libbalsa/body.c
+++ b/libbalsa/body.c
@@ -636,6 +636,15 @@ libbalsa_message_body_get_pixbuf(LibBalsaMessageBody * body, GError ** err)
mime_type = libbalsa_message_body_get_mime_type(body);
loader = gdk_pixbuf_loader_new_with_mime_type(mime_type, err);
+
+#define ENABLE_WORKAROUND_FOR_IE_NON_IANA_MIME_TYPE TRUE
+#if ENABLE_WORKAROUND_FOR_IE_NON_IANA_MIME_TYPE
+ if (!loader && g_ascii_strcasecmp(mime_type, "image/pjpeg") == 0) {
+ g_clear_error(err);
+ loader = gdk_pixbuf_loader_new_with_mime_type("image/jpeg", err);
+ }
+#endif /* ENABLE_WORKAROUND_FOR_IE_NON_IANA_MIME_TYPE */
+
g_free(mime_type);
if (loader) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]