diff options
author | Radek Doulik <rodo@ximian.com> | 2002-08-31 01:06:39 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2002-08-31 01:06:39 +0800 |
commit | 915e52dbeb814508d272dd30ae1863f79c46fc4d (patch) | |
tree | 31abc726a60aff05d3e641650c1a1a9d6f4d1717 /mail/mail-display.c | |
parent | 3b7216e20ece53587b3ce566aa67d4686067fec5 (diff) | |
download | gsoc2013-evolution-915e52dbeb814508d272dd30ae1863f79c46fc4d.tar.gz gsoc2013-evolution-915e52dbeb814508d272dd30ae1863f79c46fc4d.tar.zst gsoc2013-evolution-915e52dbeb814508d272dd30ae1863f79c46fc4d.zip |
as below (handle_text_plain_flowed): as below
2002-08-30 Radek Doulik <rodo@ximian.com>
* mail-format.c (mail_format_raw_message): as below
(handle_text_plain_flowed): as below
* mail-display.c (mail_text_write): put text in iframe, so it has
margins and should not be placed in table which changes wrapping
behavior
svn path=/trunk/; revision=17933
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index 9f3ad1c84b..0cace663ff 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -1624,8 +1624,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; @@ -1639,10 +1644,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></iframe>", xed); + mail_display_add_url (md, "data_urls", xed, ba); + gtk_html_write (html, stream, iframe, strlen (iframe)); + g_free (iframe); } void |