[evolution/gnome-3-26] Bug 758945 - Disable inline display of TIFF images
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-26] Bug 758945 - Disable inline display of TIFF images
- Date: Mon, 11 Sep 2017 14:30:59 +0000 (UTC)
commit acff21161c829c30ae336e150ee7b839deebd26f
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 11 16:27:30 2017 +0200
Bug 758945 - Disable inline display of TIFF images
src/em-format/e-mail-formatter-image.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/em-format/e-mail-formatter-image.c b/src/em-format/e-mail-formatter-image.c
index 70ca898..9f837d8 100644
--- a/src/em-format/e-mail-formatter-image.c
+++ b/src/em-format/e-mail-formatter-image.c
@@ -67,6 +67,7 @@ emfe_image_format (EMailFormatterExtension *extension,
{
gchar *content;
CamelMimePart *mime_part;
+ CamelContentType *content_type;
CamelDataWrapper *dw;
GBytes *bytes;
GOutputStream *raw_content;
@@ -75,6 +76,15 @@ emfe_image_format (EMailFormatterExtension *extension,
return FALSE;
mime_part = e_mail_part_ref_mime_part (part);
+
+ content_type = camel_mime_part_get_content_type (mime_part);
+
+ /* Skip TIFF images, which cannot be shown inline */
+ if (content_type && (
+ camel_content_type_is (content_type, "image", "tiff") ||
+ camel_content_type_is (content_type, "image", "tif")))
+ return FALSE;
+
dw = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
g_return_val_if_fail (dw, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]