diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-06-26 19:39:47 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-06-26 19:40:59 +0800 |
commit | 99a875edae6c57fd6540818d3f0da994b135a068 (patch) | |
tree | 53acc10d4dd0d44b569a0a2052e8a4300d2ef4a2 /em-format | |
parent | 137eec97eb4f3d25f662e651c168d67e7e9e85e4 (diff) | |
download | gsoc2013-evolution-99a875edae6c57fd6540818d3f0da994b135a068.tar.gz gsoc2013-evolution-99a875edae6c57fd6540818d3f0da994b135a068.tar.zst gsoc2013-evolution-99a875edae6c57fd6540818d3f0da994b135a068.zip |
Bug #515004 - Allow toggling between text and HTML view of mail
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/e-mail-formatter-text-html.c | 3 | ||||
-rw-r--r-- | em-format/e-mail-formatter-text-plain.c | 26 |
2 files changed, 18 insertions, 11 deletions
diff --git a/em-format/e-mail-formatter-text-html.c b/em-format/e-mail-formatter-text-html.c index 8834994496..e5d25a39b7 100644 --- a/em-format/e-mail-formatter-text-html.c +++ b/em-format/e-mail-formatter-text-html.c @@ -309,12 +309,13 @@ emfe_text_html_format (EMailFormatterExtension *extension, "<div class=\"part-container-nostyle\">" "<iframe width=\"100%%\" height=\"10\" " " frameborder=\"0\" src=\"%s\" " - " id=\"%s.iframe\" " + " id=\"%s.iframe\" name=\"%s\" " " style=\"border: 1px solid #%06x; background-color: #%06x;\">" "</iframe>" "</div>", uri, part->id, + part->id, e_color_to_value ((GdkColor *) e_mail_formatter_get_color ( formatter, E_MAIL_FORMATTER_COLOR_FRAME)), diff --git a/em-format/e-mail-formatter-text-plain.c b/em-format/e-mail-formatter-text-plain.c index a8cb7f2943..7859a41ab8 100644 --- a/em-format/e-mail-formatter-text-plain.c +++ b/em-format/e-mail-formatter-text-plain.c @@ -114,12 +114,8 @@ emfe_text_plain_format (EMailFormatterExtension *extension, content = g_strdup_printf ( "<div class=\"part-container\" style=\"" - "border-color: #%06x;" - "background-color: #%06x; color: #%06x;\">" - "<div class=\"part-container-inner-margin pre\">\n", - e_color_to_value ((GdkColor *) - e_mail_formatter_get_color ( - formatter, E_MAIL_FORMATTER_COLOR_FRAME)), + "border: none; padding: 10px; margin: 0; " + "background-color: #%06x; color: #%06x;\">\n", e_color_to_value ((GdkColor *) e_mail_formatter_get_color ( formatter, E_MAIL_FORMATTER_COLOR_CONTENT)), @@ -134,7 +130,7 @@ emfe_text_plain_format (EMailFormatterExtension *extension, g_object_unref (filtered_stream); g_free (content); - camel_stream_write_string (stream, "</div></div>\n", cancellable, NULL); + camel_stream_write_string (stream, "</div>\n", cancellable, NULL); if (context->mode == E_MAIL_FORMATTER_MODE_RAW) { camel_stream_write_string (stream, "</body></html>", @@ -153,10 +149,20 @@ emfe_text_plain_format (EMailFormatterExtension *extension, NULL); str = g_strdup_printf ( + "<div class=\"part-container-nostyle\" >" "<iframe width=\"100%%\" height=\"10\"" - " id=\"%s.iframe\" " - " frameborder=\"0\" src=\"%s\"></iframe>", - part->id, uri); + " id=\"%s.iframe\" name=\"%s\" " + " frameborder=\"0\" src=\"%s\" " + " style=\"border: 1px solid #%06x; background-color: #%06x;\">" + "</iframe>" + "</div>", + part->id, part->id, uri, + e_color_to_value ((GdkColor *) + e_mail_formatter_get_color ( + formatter, E_MAIL_FORMATTER_COLOR_FRAME)), + e_color_to_value ((GdkColor *) + e_mail_formatter_get_color ( + formatter, E_MAIL_FORMATTER_COLOR_CONTENT))); camel_stream_write_string (stream, str, cancellable, NULL); |