From ff31ff3b84015b5d5b164aa7a64966fbf5c7b368 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 24 Nov 2003 00:35:57 +0000 Subject: do not use horizonal rule, attachment content is now inside simple frame 2003-11-24 Radek Doulik * em-format.c (emf_multipart_mixed): do not use horizonal rule, attachment content is now inside simple frame * em-format-html.c (efh_text_plain): add 6 points around text plain content and frame it (efh_text_html): frame text/html (efh_format_do): fix body tag, set bgcolor (em_format_html_format_headers): do not put headers into own table, content body is framed now instead (efh_format_message): update for headers/body changes * em-format-html-display.c (efhd_format_attachment): put additional vertical space around attachment button svn path=/trunk/; revision=23474 --- mail/em-format-html.c | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 507a48c8bb..d7929a0a18 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -134,7 +134,7 @@ efh_init(GObject *o) g_signal_connect(efh->html, "url_requested", G_CALLBACK(efh_url_requested), efh); g_signal_connect(efh->html, "object_requested", G_CALLBACK(efh_object_requested), efh); - efh->header_colour = 0xeeeeee; + efh->body_colour = 0xeeeeee; efh->text_colour = 0; efh->text_html_flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES | CAMEL_MIME_FILTER_TOHTML_MARK_CITATION; @@ -657,6 +657,11 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo guint32 rgb = 0x737373, flags; int i, count; + camel_stream_printf (stream, + "
\n" + "
\n" + "\n"); + flags = efh->text_html_flags; /* Check for RFC 2646 flowed text. */ @@ -718,6 +723,10 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo } camel_object_unref(filtered_stream); + camel_stream_write_string(stream, + "
\n" + "
\n" + "
\n"); } static void @@ -761,7 +770,10 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor const char *location, *base; EMFormatPURI *puri; - camel_stream_write_string(stream, "\n\n"); + camel_stream_write_string(stream, + "
\n" + "
\n" + "\n"); if ((base = camel_medium_get_header((CamelMedium *)part, "Content-Base"))) { char *base_url; @@ -784,7 +796,9 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor location = puri->uri?puri->uri:puri->cid; d(printf("adding iframe, location %s\n", location)); camel_stream_printf(stream, - "", + "\n" + "
\n" + "
\n", location, location); } @@ -1186,7 +1200,8 @@ static void efh_format_do(struct _mail_msg *mm) camel_stream_printf((CamelStream *)m->estream, "\n\n" "\n\n\n" - "\n", + m->format->body_colour & 0xffffff, m->format->text_colour & 0xffffff); /* */ @@ -1542,14 +1557,8 @@ em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMediu if (!efh->simple_headers) camel_stream_printf(stream, - "" - "
" - "" - "
" - "" - "
" - "header_colour & 0xffffff, + "\n" + "
\n", efh->text_colour & 0xffffff); /* dump selected headers */ @@ -1571,10 +1580,7 @@ em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMediu if (!efh->simple_headers) camel_stream_printf(stream, - "
" - "
" - "
" - "
"); + "\n\n"); #undef emf } @@ -1585,16 +1591,17 @@ static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium * efh->enveloped_validity = NULL; + if (emf->message != part) + camel_stream_printf(stream, "
\n"); + if (!efh->hide_headers) em_format_html_format_headers(efh, stream, part); - if (emf->message != part) - camel_stream_printf(stream, "
"); - + camel_stream_printf(stream, "
\n"); em_format_part(emf, stream, (CamelMimePart *)part); if (emf->message != part) - camel_stream_printf(stream, "
"); + camel_stream_printf(stream, "
\n"); efh->enveloped_validity = save; #undef efh @@ -1633,7 +1640,7 @@ efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c "" "
" "" - "
"); + "\n"); /* output some info about it */ text = em_format_describe_part(part, mime_type); -- cgit v1.2.3