From 915e52dbeb814508d272dd30ae1863f79c46fc4d Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 30 Aug 2002 17:06:39 +0000 Subject: as below (handle_text_plain_flowed): as below 2002-08-30 Radek Doulik * 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 --- mail/mail-display.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'mail/mail-display.c') 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 = "\n"; + gchar *ett = "\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, "", 4); - gtk_html_write (html, stream, htmltext, strlen (htmltext)); - gtk_html_write (html, stream, "", 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 ("", xed); + mail_display_add_url (md, "data_urls", xed, ba); + gtk_html_write (html, stream, iframe, strlen (iframe)); + g_free (iframe); } void -- cgit v1.2.3