From 66f4e5ce1c0d8830bea66844c8bd0cd79568953a Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 1 Jun 2000 22:35:07 +0000 Subject: Oops. This needs to take a message argument because we might be writing * mail-format.c (write_headers): Oops. This needs to take a message argument because we might be writing headers for an embedded message/rfc822 subpart rather than the root document. svn path=/trunk/; revision=3343 --- mail/ChangeLog | 6 ++++++ mail/mail-format.c | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 5d003485f3..d3b1725439 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-06-01 Dan Winship + + * mail-format.c (write_headers): Oops. This needs to take a + message argument because we might be writing headers for an + embedded message/rfc822 subpart rather than the root document. + 2000-06-01 Jeffrey Stedfast * mail-config.c: Config dialogs are completed. diff --git a/mail/mail-format.c b/mail/mail-format.c index 0fc143488e..790d420f18 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -86,7 +86,8 @@ static void handle_via_bonobo (CamelMimePart *part, struct mail_format_data *mfd); /* writes the header info for a mime message into an html stream */ -static void write_headers (struct mail_format_data *mfd); +static void write_headers (CamelMimeMessage *message, + struct mail_format_data *mfd); /* dispatch html printing via mimetype */ static void call_handler_function (CamelMimePart *part, @@ -123,7 +124,7 @@ mail_format_mime_message (CamelMimeMessage *mime_message, mfd.urls, free_urls); } - write_headers (&mfd); + write_headers (mime_message, &mfd); call_handler_function (CAMEL_MIME_PART (mime_message), &mfd); } @@ -385,7 +386,7 @@ write_recipients_to_stream (const gchar *recipient_type, static void -write_headers (struct mail_format_data *mfd) +write_headers (CamelMimeMessage *message, struct mail_format_data *mfd) { const CamelInternetAddress *recipients; @@ -395,24 +396,24 @@ write_headers (struct mail_format_data *mfd) "\n"); write_field_to_stream ("From:", - camel_mime_message_get_from (mfd->root), + camel_mime_message_get_from (message), TRUE, mfd->html, mfd->stream); - if (camel_mime_message_get_reply_to (mfd->root)) { + if (camel_mime_message_get_reply_to (message)) { write_field_to_stream ("Reply-To:", - camel_mime_message_get_reply_to (mfd->root), + camel_mime_message_get_reply_to (message), FALSE, mfd->html, mfd->stream); } write_recipients_to_stream ("To:", - camel_mime_message_get_recipients (mfd->root, CAMEL_RECIPIENT_TYPE_TO), + camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO), FALSE, TRUE, mfd->html, mfd->stream); - recipients = camel_mime_message_get_recipients (mfd->root, CAMEL_RECIPIENT_TYPE_CC); + recipients = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC); write_recipients_to_stream ("Cc:", recipients, TRUE, TRUE, mfd->html, mfd->stream); write_field_to_stream ("Subject:", - camel_mime_message_get_subject (mfd->root), + camel_mime_message_get_subject (message), TRUE, mfd->html, mfd->stream); mail_html_write (mfd->html, mfd->stream, "
"); -- cgit