aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-01-11 15:04:32 +0800
committerMilan Crha <mcrha@redhat.com>2013-01-11 15:04:32 +0800
commit9d1867b99b5a693b364d04e3302224e672111092 (patch)
treec0c75e3e98e14eca31d2b36d116a2f2d2ef1b7f6
parente2fff99a0bee1744856414f45bdb4687ff452a3d (diff)
downloadgsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar.gz
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar.bz2
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar.lz
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar.xz
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.tar.zst
gsoc2013-evolution-9d1867b99b5a693b364d04e3302224e672111092.zip
Do not hide 'attachment' images with Content-ID
-rw-r--r--em-format/e-mail-parser-image.c10
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 a602a9b26d..741daa7454 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);