aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-formatter-print-headers.c2
-rw-r--r--em-format/e-mail-formatter-print.c2
-rw-r--r--em-format/e-mail-formatter-quote.c2
-rw-r--r--em-format/e-mail-parser-multipart-digest.c2
-rw-r--r--em-format/e-mail-parser-multipart-mixed.c4
-rw-r--r--em-format/e-mail-parser.c4
-rw-r--r--em-format/e-mail-part.c8
-rw-r--r--em-format/e-mail-part.h1
8 files changed, 17 insertions, 8 deletions
diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c
index 65515508a5..591c28ee80 100644
--- a/em-format/e-mail-formatter-print-headers.c
+++ b/em-format/e-mail-formatter-print-headers.c
@@ -187,7 +187,7 @@ emfpe_headers_format (EMailFormatterExtension *extension,
if (!e_mail_part_id_has_prefix (mail_part, part_id_prefix))
continue;
- if (!mail_part->is_attachment)
+ if (!e_mail_part_get_is_attachment (mail_part))
continue;
if (mail_part->is_hidden)
diff --git a/em-format/e-mail-formatter-print.c b/em-format/e-mail-formatter-print.c
index d193c062d8..70689df4a5 100644
--- a/em-format/e-mail-formatter-print.c
+++ b/em-format/e-mail-formatter-print.c
@@ -148,7 +148,7 @@ mail_formatter_print_run (EMailFormatter *formatter,
if (mime_type == NULL)
continue;
- if (part->is_attachment) {
+ if (e_mail_part_get_is_attachment (part)) {
if (e_mail_part_get_cid (part) != NULL)
continue;
diff --git a/em-format/e-mail-formatter-quote.c b/em-format/e-mail-formatter-quote.c
index 12978f6978..52d76ec599 100644
--- a/em-format/e-mail-formatter-quote.c
+++ b/em-format/e-mail-formatter-quote.c
@@ -119,7 +119,7 @@ mail_formatter_quote_run (EMailFormatter *formatter,
if (part->is_hidden)
continue;
- if (part->is_attachment)
+ if (e_mail_part_get_is_attachment (part))
continue;
mime_type = e_mail_part_get_mime_type (part);
diff --git a/em-format/e-mail-parser-multipart-digest.c b/em-format/e-mail-parser-multipart-digest.c
index 8cf80be00f..ef1090848c 100644
--- a/em-format/e-mail-parser-multipart-digest.c
+++ b/em-format/e-mail-parser-multipart-digest.c
@@ -98,7 +98,7 @@ empe_mp_digest_parse (EMailParserExtension *extension,
wrap_as_attachment =
(mail_part != NULL) &&
- !mail_part->is_attachment;
+ !e_mail_part_get_is_attachment (mail_part);
/* Force the message to be collapsable */
if (wrap_as_attachment)
diff --git a/em-format/e-mail-parser-multipart-mixed.c b/em-format/e-mail-parser-multipart-mixed.c
index 410d78bdeb..6fb9ca787f 100644
--- a/em-format/e-mail-parser-multipart-mixed.c
+++ b/em-format/e-mail-parser-multipart-mixed.c
@@ -89,7 +89,7 @@ empe_mp_mixed_parse (EMailParserExtension *extension,
* not multipart/related. */
if (mail_part != NULL &&
e_mail_part_get_cid (mail_part) != NULL &&
- (!mail_part->is_attachment ||
+ (!e_mail_part_get_is_attachment (mail_part) ||
mail_part->is_hidden)) {
e_mail_parser_wrap_as_attachment (
@@ -99,7 +99,7 @@ empe_mp_mixed_parse (EMailParserExtension *extension,
} else if (mail_part == NULL ||
(camel_content_type_is (ct, "message", "rfc822") &&
mail_part != NULL &&
- !mail_part->is_attachment)) {
+ !e_mail_part_get_is_attachment (mail_part))) {
e_mail_parser_wrap_as_attachment (
parser, subpart, part_id, &work_queue);
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 46eec598f2..75ec0e5f8c 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -367,7 +367,7 @@ e_mail_parser_parse_sync (EMailParser *parser,
e_mail_part_get_cid (part),
e_mail_part_get_mime_type (part),
part->is_hidden ? 1 : 0,
- part->is_attachment ? 1 : 0);
+ e_mail_part_get_is_attachment (part) ? 1 : 0);
e_mail_part_unref (part);
}
@@ -471,7 +471,7 @@ e_mail_parser_parse_finish (EMailParser *parser,
e_mail_part_get_cid (part),
e_mail_part_get_mime_type (part),
part->is_hidden ? 1 : 0,
- part->is_attachment ? 1 : 0);
+ e_mail_part_get_is_attachment (part) ? 1 : 0);
e_mail_part_unref (part);
}
diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c
index 07b606361d..6c1ee969f5 100644
--- a/em-format/e-mail-part.c
+++ b/em-format/e-mail-part.c
@@ -267,6 +267,14 @@ e_mail_part_set_mime_type (EMailPart *part,
part->mime_type = g_strdup (mime_type);
}
+gboolean
+e_mail_part_get_is_attachment (EMailPart *part)
+{
+ g_return_val_if_fail (part != NULL, FALSE);
+
+ return part->is_attachment;
+}
+
static EMailPartValidityPair *
mail_part_find_validity_pair (EMailPart *part,
guint32 validity_type)
diff --git a/em-format/e-mail-part.h b/em-format/e-mail-part.h
index f4a1bcdf53..e4a83753a9 100644
--- a/em-format/e-mail-part.h
+++ b/em-format/e-mail-part.h
@@ -109,6 +109,7 @@ CamelMimePart * e_mail_part_ref_mime_part (EMailPart *part);
const gchar * e_mail_part_get_mime_type (EMailPart *part);
void e_mail_part_set_mime_type (EMailPart *part,
const gchar *mime_type);
+gboolean e_mail_part_get_is_attachment (EMailPart *part);
void e_mail_part_update_validity (EMailPart *part,
CamelCipherValidity *validity,
guint32 validity_type);