diff options
author | Radek Doulik <rodo@src.gnome.org> | 2002-11-21 18:57:47 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2002-11-21 18:57:47 +0800 |
commit | 6cde624508affa75a530fd92a5d6d2af167e59be (patch) | |
tree | 3ff0b4025ed41a52318d4943381e3d7537a3e49d /mail/mail-display.c | |
parent | 4435bb12ec1286c40f71d2a41aa45c6bd1583442 (diff) | |
download | gsoc2013-evolution-6cde624508affa75a530fd92a5d6d2af167e59be.tar.gz gsoc2013-evolution-6cde624508affa75a530fd92a5d6d2af167e59be.tar.zst gsoc2013-evolution-6cde624508affa75a530fd92a5d6d2af167e59be.zip |
applied patches from http://bugzilla.ximian.com/show_bug.cgi?id=29588
svn path=/trunk/; revision=18877
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index c74a0f7b37..8fcefc3604 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -1646,8 +1646,13 @@ mail_display_redisplay_when_loaded (MailDisplay *md, } void -mail_text_write (GtkHTML *html, GtkHTMLStream *stream, gboolean printing, const char *text) +mail_text_write (GtkHTML *html, GtkHTMLStream *stream, MailDisplay *md, CamelMimePart *part, gint idx, gboolean printing, const char *text) { + GByteArray *ba; + gchar *xed, *iframe; + gchar *btt = "<tt>\n"; + gchar *ett = "</tt>\n"; + guint flags; char *htmltext; @@ -1661,10 +1666,17 @@ mail_text_write (GtkHTML *html, GtkHTMLStream *stream, gboolean printing, const htmltext = e_text_to_html_full (text, flags, mail_config_get_citation_color ()); - gtk_html_write (html, stream, "<tt>", 4); - gtk_html_write (html, stream, htmltext, strlen (htmltext)); - gtk_html_write (html, stream, "</tt>", 5); + ba = g_byte_array_new (); + g_byte_array_append (ba, (const guint8 *) btt, strlen (btt) + 1); + g_byte_array_append (ba, (const guint8 *) htmltext, strlen (htmltext) + 1); + g_byte_array_append (ba, (const guint8 *) ett, strlen (ett) + 1); g_free (htmltext); + + xed = g_strdup_printf ("x-evolution-data:%p-%d", part, idx); + iframe = g_strdup_printf ("<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>", xed, xed); + mail_display_add_url (md, "data_urls", xed, ba); + gtk_html_write (html, stream, iframe, strlen (iframe)); + g_free (iframe); } void @@ -1710,7 +1722,10 @@ mail_display_render (MailDisplay *md, GtkHTML *html, gboolean reset_scroll) "<!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"); - mail_html_write (html, stream, "<body marginwidth=0 marginheight=0>\n"); + if (md->current_message && md->display_style == MAIL_CONFIG_DISPLAY_SOURCE) + mail_html_write (html, stream, "<body>\n"); + else + mail_html_write (html, stream, "<body marginwidth=0 marginheight=0>\n"); flag = md->info ? camel_tag_get (&md->info->user_tags, "follow-up") : NULL; completed = md->info ? camel_tag_get (&md->info->user_tags, "completed-on") : NULL; |