diff options
author | Radek Doulik <rodo@ximian.com> | 2003-11-24 08:35:57 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2003-11-24 08:35:57 +0800 |
commit | ff31ff3b84015b5d5b164aa7a64966fbf5c7b368 (patch) | |
tree | d315a45112adec3e43bc6844dbf4a02ec665cdd4 /mail | |
parent | 8cd8035af10d3d1c8f86e206ad9ad7dce5eca4a2 (diff) | |
download | gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar.gz gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar.bz2 gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar.lz gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar.xz gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.tar.zst gsoc2013-evolution-ff31ff3b84015b5d5b164aa7a64966fbf5c7b368.zip |
do not use horizonal rule, attachment content is now inside simple frame
2003-11-24 Radek Doulik <rodo@ximian.com>
* 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
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 16 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 7 | ||||
-rw-r--r-- | mail/em-format-html.c | 49 | ||||
-rw-r--r-- | mail/em-format-html.h | 2 | ||||
-rw-r--r-- | 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 <rodo@ximian.com> + + * 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 <fejj@ximian.com> * 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, + "<table height=6><tr><td><a></a></td></tr></table>\n" "<table cellspacing=0 cellpadding=0><tr><td>" "<table width=10 cellspacing=0 cellpadding=0>" "<tr><td></td></tr></table></td>"); @@ -1328,7 +1329,9 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, g_free(html); g_free(text); - camel_stream_write_string(stream, "</font></td></tr><tr></table>"); + camel_stream_write_string(stream, + "</font></td></tr><tr></table>\n" + "<table height=6><tr><td><a></a></td></tr></table>\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, + "<table bgcolor=darkgray cellspacing=0 cellpadding=1 width=100%%><tr><td>\n" + "<table bgcolor=white cellspacing=0 cellpadding=0 width=100%%><tr><td>\n" + "<table cellspacing=0 cellpadding=10><td><tr>\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, + "</td></tr></table>\n" + "</td></tr></table>\n" + "</td></tr></table>\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<!-- text/html -->\n"); + camel_stream_write_string(stream, + "<table bgcolor=darkgray cellspacing=0 cellpadding=1 width=100%%><tr><td>\n" + "<table bgcolor=white cellspacing=0 cellpadding=0 width=100%%><tr><td>\n" + "<!-- text/html -->\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, - "<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>", + "<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>\n" + "</td></tr></table>\n" + "</td></tr></table>\n", location, location); } @@ -1186,7 +1200,8 @@ static void efh_format_do(struct _mail_msg *mm) camel_stream_printf((CamelStream *)m->estream, "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\">\n</head>\n" - "<body text=\"#%06x\"\n", + "<body bgcolor =\"#%06x\" text=\"#%06x\" marginwidth=6 marginheight=6>\n", + m->format->body_colour & 0xffffff, m->format->text_colour & 0xffffff); /* <insert top-header stuff here> */ @@ -1542,14 +1557,8 @@ em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMediu if (!efh->simple_headers) camel_stream_printf(stream, - "<table width=\"100%%\" cellpadding=5 cellspacing=0>" - "<tr><td>" - "<table width=\"100%%\" cellpaddding=1 cellspacing=0 bgcolor=\"#000000\">" - "<tr><td>" - "<table width=\"100%%\"cellpadding=0 cellspacing=0 bgcolor=\"#%06x\">" - "<tr><td>" - "<table><font color=\"#%06x\"", - efh->header_colour & 0xffffff, + "<font color=\"#%06x\">\n" + "<table cellpadding=0>\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, - "</font></table>" - "</td></tr></table>" - "</td></tr></table>" - "</td></tr></table>"); + "</table>\n</font>\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, "<blockquote>\n"); + if (!efh->hide_headers) em_format_html_format_headers(efh, stream, part); - if (emf->message != part) - camel_stream_printf(stream, "<blockquote>"); - + camel_stream_printf(stream, "<table height=6><tr><td><a></a></td></tr></table>\n"); em_format_part(emf, stream, (CamelMimePart *)part); if (emf->message != part) - camel_stream_printf(stream, "</blockquote>"); + camel_stream_printf(stream, "</blockquote>\n"); efh->enveloped_validity = save; #undef efh @@ -1633,7 +1640,7 @@ efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c "<table width=10 cellspacing=0 cellpadding=0>" "<tr><td></td></tr></table></td>" "<td><table width=3 cellspacing=0 cellpadding=0>" - "<tr><td></td></tr></table></td><td><font size=-1>"); + "<tr><td></td></tr></table></td><td><font size=-1>\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, "<hr>\n"); - part = camel_multipart_get_part(mp, i); em_format_part(emf, stream, part); } |