diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-05 05:45:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:04 +0800 |
commit | 2f0d83cf74b94d5e6272c07179df6e6c7a929789 (patch) | |
tree | cf6b432d7992770ac8841f242cb487c2ac31a7fc /em-format/e-mail-formatter-print-headers.c | |
parent | 13f4544dafe211a748b064b86a8af4085d042b2b (diff) | |
download | gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.gz gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.bz2 gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.lz gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.xz gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.zst gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.zip |
EMailFormatterContext: Keep a reference to EMailPartList.
Replace the individual components of an EMailPartList with a reference
on the EMailPartList itself in EMailFormatContext. Easier to manage.
Diffstat (limited to 'em-format/e-mail-formatter-print-headers.c')
-rw-r--r-- | em-format/e-mail-formatter-print-headers.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c index a16264b9bf..8cda0e598f 100644 --- a/em-format/e-mail-formatter-print-headers.c +++ b/em-format/e-mail-formatter-print-headers.c @@ -108,8 +108,14 @@ emfpe_headers_format (EMailFormatterExtension *extension, header->flags | E_MAIL_FORMATTER_HEADER_FLAG_NOLINKS, "UTF-8"); } else { - raw_header.value = g_strdup (camel_medium_get_header ( - CAMEL_MEDIUM (context->message), header->name)); + CamelMimeMessage *message; + const gchar *header_value; + + message = context->part_list->message; + + header_value = camel_medium_get_header ( + CAMEL_MEDIUM (message), header->name); + raw_header.value = g_strdup (header_value); if (raw_header.value && *raw_header.value) { e_mail_formatter_format_header (formatter, str, @@ -130,7 +136,7 @@ emfpe_headers_format (EMailFormatterExtension *extension, raw_header.name = _("Security"); tmp = g_string_new (""); /* Find first secured part. */ - for (parts_iter = context->parts; parts_iter; parts_iter = parts_iter->next) { + for (parts_iter = context->part_list->list; parts_iter; parts_iter = parts_iter->next) { EMailPart *mail_part = parts_iter->data; if (mail_part == NULL) @@ -179,7 +185,7 @@ emfpe_headers_format (EMailFormatterExtension *extension, /* Count attachments and display the number as a header */ attachments_count = 0; - for (parts_iter = context->parts; parts_iter; parts_iter = parts_iter->next) { + for (parts_iter = context->part_list->list; parts_iter; parts_iter = parts_iter->next) { EMailPart *mail_part = parts_iter->data; if (!mail_part) |