[evolution] Bug 790311 - Print of message attachment shows main message headers
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 790311 - Print of message attachment shows main message headers
- Date: Mon, 27 Nov 2017 18:15:29 +0000 (UTC)
commit 4c977fe77ec90e555e05d6bdc64ef059a51e61bd
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 27 19:14:58 2017 +0100
Bug 790311 - Print of message attachment shows main message headers
src/em-format/e-mail-part-headers.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/src/em-format/e-mail-part-headers.c b/src/em-format/e-mail-part-headers.c
index c509040..7f5a9b2 100644
--- a/src/em-format/e-mail-part-headers.c
+++ b/src/em-format/e-mail-part-headers.c
@@ -59,26 +59,19 @@ static GtkTreeModel *
mail_part_headers_build_print_model (EMailPartHeaders *part)
{
GtkListStore *list_store;
- EMailPartList *part_list;
- CamelMimeMessage *message;
+ CamelMimePart *mime_part;
const CamelNameValueArray *headers;
gint default_position = 0;
guint ii, length = 0;
- /* If the part list is NULL, it means the function was called
- * too early. The part must be added to a part list first so
- * we have access to the CamelMimeMessage. */
- part_list = e_mail_part_ref_part_list (E_MAIL_PART (part));
- g_return_val_if_fail (part_list != NULL, NULL);
-
list_store = gtk_list_store_new (
E_MAIL_PART_HEADERS_PRINT_MODEL_NUM_COLUMNS,
G_TYPE_BOOLEAN, /* INCLUDE */
G_TYPE_STRING, /* HEADER_NAME */
G_TYPE_STRING); /* HEADER_VALUE */
- message = e_mail_part_list_get_message (part_list);
- headers = camel_medium_get_headers (CAMEL_MEDIUM (message));
+ mime_part = e_mail_part_ref_mime_part (E_MAIL_PART (part));
+ headers = camel_medium_get_headers (CAMEL_MEDIUM (mime_part));
length = camel_name_value_array_get_length (headers);
for (ii = 0; ii < length; ii++) {
@@ -124,7 +117,7 @@ mail_part_headers_build_print_model (EMailPartHeaders *part)
-1);
}
- g_object_unref (part_list);
+ g_object_unref (mime_part);
/* Stash the print model internally. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]