From 9bc309a2f559996e370b140dfe7c40ef9d9965e0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 16 Dec 2002 21:54:34 +0000 Subject: Wrap the content with a table so that text isn't fully left-justified. 2002-12-16 Jeffrey Stedfast * mail-format.c #define a STANDARD_ISSUE_TABLE_OPEN string used for wrapping textual message parts to keep them being fully-left justified. (mail_format_raw_message): Wrap the content with a table so that text isn't fully left-justified. (write_hr): Use it here too. (handle_text_plain): And finally here. svn path=/trunk/; revision=19141 --- mail/ChangeLog | 10 ++++++++++ mail/mail-format.c | 17 ++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index cf0bf9a72a..482dad554e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2002-12-16 Jeffrey Stedfast + + * mail-format.c #define a STANDARD_ISSUE_TABLE_OPEN string used + for wrapping textual message parts to keep them being fully-left + justified. + (mail_format_raw_message): Wrap the content with a table so that + text isn't fully left-justified. + (write_hr): Use it here too. + (handle_text_plain): And finally here. + 2002-12-16 Jeffrey Stedfast * mail-display.c (mail_error_printf): Use camel_text_to_html() diff --git a/mail/mail-format.c b/mail/mail-format.c index 7b7eabd2ee..fd77b06a74 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -52,6 +52,8 @@ #include "mail-crypto.h" +#define STANDARD_ISSUE_TABLE_OPEN "" + static ssize_t mail_format_data_wrapper_write_to_stream (CamelDataWrapper *wrapper, MailDisplay *mail_display, CamelStream *stream); @@ -189,12 +191,12 @@ mail_format_raw_message (CamelMimeMessage *mime_message, MailDisplay *md, camel_stream_filter_add (filtered_stream, html_filter); camel_object_unref (html_filter); - camel_stream_write ((CamelStream *) stream, "", 4); + camel_stream_write_string ((CamelStream *) stream, STANDARD_ISSUE_TABLE_OPEN "
"); mail_format_data_wrapper_write_to_stream (wrapper, md, (CamelStream *) filtered_stream); camel_object_unref (filtered_stream); - camel_stream_write ((CamelStream *) stream, "", 5); + camel_stream_write_string ((CamelStream *) stream, "
"); } static const char * @@ -1166,8 +1168,8 @@ mail_format_get_data_wrapper_text (CamelDataWrapper *wrapper, MailDisplay *mail_ static void write_hr (MailDisplayStream *stream) { - camel_stream_write_string ((CamelStream *) stream, "

" + camel_stream_write_string ((CamelStream *) stream, STANDARD_ISSUE_TABLE_OPEN + "

" "
\n"); } @@ -1199,19 +1201,20 @@ handle_text_plain (CamelMimePart *part, const char *mime_type, type = camel_mime_part_get_content_type (part); format = header_content_type_param (type, "format"); if (format && !strcasecmp (format, "flowed")) - flags |= 0 /*CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED*/; + flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED; html_filter = camel_mime_filter_tohtml_new (flags, colour); filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) stream); camel_stream_filter_add (filtered_stream, html_filter); camel_object_unref (html_filter); - camel_stream_write ((CamelStream *) stream, "\n", 5); + camel_stream_write_string ((CamelStream *) stream, STANDARD_ISSUE_TABLE_OPEN "\n"); wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part)); mail_format_data_wrapper_write_to_stream (wrapper, md, (CamelStream *) filtered_stream); - camel_stream_write ((CamelStream *) stream, "\n", 6); + camel_stream_write_string ((CamelStream *) stream, "\n"); + camel_object_unref (filtered_stream); return TRUE; -- cgit