[evolution] Do not hide 'attachment' images with Content-ID
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Do not hide 'attachment' images with Content-ID
- Date: Fri, 11 Jan 2013 07:04:47 +0000 (UTC)
commit 9d1867b99b5a693b364d04e3302224e672111092
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 11 08:04:32 2013 +0100
Do not hide 'attachment' images with Content-ID
em-format/e-mail-parser-image.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/em-format/e-mail-parser-image.c b/em-format/e-mail-parser-image.c
index a602a9b..741daa7 100644
--- a/em-format/e-mail-parser-image.c
+++ b/em-format/e-mail-parser-image.c
@@ -58,6 +58,12 @@ static const gchar *parser_mime_types[] = {
};
static gboolean
+is_attachment (const gchar *disposition)
+{
+ return disposition && g_ascii_strcasecmp (disposition, "attachment") == 0;
+}
+
+static gboolean
empe_image_parse (EMailParserExtension *extension,
EMailParser *parser,
CamelMimePart *part,
@@ -88,13 +94,13 @@ empe_image_parse (EMailParserExtension *extension,
mail_part->is_attachment = TRUE;
mail_part->cid = cid;
mail_part->mime_type = ct ? camel_content_type_simple (ct) : g_strdup ("image/*");
- mail_part->is_hidden = (cid != NULL);
+ mail_part->is_hidden = cid != NULL && !is_attachment (camel_mime_part_get_disposition (part));
g_string_truncate (part_id, len);
g_queue_push_tail (&work_queue, mail_part);
- if (cid == NULL)
+ if (!mail_part->is_hidden)
e_mail_parser_wrap_as_attachment (
parser, part, part_id, &work_queue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]