[evolution/gnome-3-6] Do not hide 'attachment' images with Content-ID
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-6] Do not hide 'attachment' images with Content-ID
- Date: Fri, 11 Jan 2013 07:05:25 +0000 (UTC)
commit 9d9bd1f298466b3f49f031e41ce028bd1fdf7558
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 11 08:05:03 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 b252714..ebec1d0 100644
--- a/em-format/e-mail-parser-image.c
+++ b/em-format/e-mail-parser-image.c
@@ -71,6 +71,12 @@ static const gchar *parser_mime_types[] = { "image/gif",
"image/pjpeg",
NULL };
+static gboolean
+is_attachment (const gchar *disposition)
+{
+ return disposition && g_ascii_strcasecmp (disposition, "attachment") == 0;
+}
+
static GSList *
empe_image_parse (EMailParserExtension *extension,
EMailParser *parser,
@@ -103,11 +109,11 @@ 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);
- if (!cid) {
+ if (!mail_part->is_hidden) {
return e_mail_parser_wrap_as_attachment (
parser, part, g_slist_append (NULL, mail_part),
part_id, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]