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/ChangeLog | 16 ++++++++++++++ mail/em-format-html-display.c | 7 +++++-- mail/em-format-html.c | 49 ++++++++++++++++++++++++------------------- mail/em-format-html.h | 2 +- mail/em-format.c | 3 --- 5 files changed, 50 insertions(+), 27 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index bf6a1c7223..a172d33ed0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,19 @@ +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 + 2003-11-22 Jeffrey Stedfast * em-folder-tree-model.c (model_drag_data_received) diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 6aa74be4f1..3d57961537 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -169,7 +169,7 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd) b = 128 - ((SCALE * b) >> 9); } - efhd->formathtml.header_colour = ((r<<16) | (g<< 8) | b) & 0xffffff; + efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff; r = style->text[state].red >> 8; g = style->text[state].green >> 8; @@ -1310,6 +1310,7 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, info->shown = em_format_is_inline(emf, info->puri.part) && handle != NULL; camel_stream_write_string(stream, + "
\n" ""); @@ -1328,7 +1329,9 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, g_free(html); g_free(text); - camel_stream_write_string(stream, "
" "" "
"); + camel_stream_write_string(stream, + "\n" + "
\n"); if (handle) { if (info->shown) 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); diff --git a/mail/em-format-html.h b/mail/em-format-html.h index 892a6d8461..c54669aebc 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -111,7 +111,7 @@ struct _EMFormatHTML { GSList *headers; guint32 text_html_flags; /* default flags for text to html conversion */ - guint32 header_colour; /* header box colour */ + guint32 body_colour; /* header box colour */ guint32 text_colour; guint32 citation_colour; unsigned int xmailer_mask:4; diff --git a/mail/em-format.c b/mail/em-format.c index b5f24716d9..208b4b79b0 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -980,9 +980,6 @@ emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, con nparts = camel_multipart_get_number(mp); for (i = 0; i < nparts; i++) { - if (i != 0) - camel_stream_printf (stream, "
\n"); - part = camel_multipart_get_part(mp, i); em_format_part(emf, stream, part); } -- cgit