diff options
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index cc42e4bed1..552f4db3ca 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -1291,40 +1291,17 @@ mail_display_redisplay_when_loaded (MailDisplay *md, } void -mail_html_write (GtkHTML *html, GtkHTMLStream *stream, - const char *format, ...) +mail_text_write (GtkHTML *html, GtkHTMLStream *stream, const char *text) { - char *buf; - va_list ap; - - va_start (ap, format); - buf = g_strdup_vprintf (format, ap); - va_end (ap); - gtk_html_write (html, stream, buf, strlen (buf)); - /* printf (buf); */ - g_free (buf); -} - -void -mail_text_write (GtkHTML *html, GtkHTMLStream *stream, - const char *format, ...) -{ - char *buf, *htmltext; - va_list ap; + char *htmltext; - va_start (ap, format); - buf = g_strdup_vprintf (format, ap); - va_end (ap); - - htmltext = e_text_to_html_full (buf, E_TEXT_TO_HTML_CONVERT_URLS | + htmltext = e_text_to_html_full (text, E_TEXT_TO_HTML_CONVERT_URLS | E_TEXT_TO_HTML_CONVERT_ADDRESSES | E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_SPACES | (mail_config_get_citation_highlight () ? E_TEXT_TO_HTML_MARK_CITATION : 0), mail_config_get_citation_color ()); - g_free (buf); - gtk_html_write (html, stream, "<tt>", 4); gtk_html_write (html, stream, htmltext, strlen (htmltext)); gtk_html_write (html, stream, "</tt>", 5); @@ -1332,8 +1309,8 @@ mail_text_write (GtkHTML *html, GtkHTMLStream *stream, } void -mail_error_write (GtkHTML *html, GtkHTMLStream *stream, - const char *format, ...) +mail_error_printf (GtkHTML *html, GtkHTMLStream *stream, + const char *format, ...) { char *buf, *htmltext; va_list ap; |