diff options
Diffstat (limited to 'mail/em-html-stream.c')
-rw-r--r-- | mail/em-html-stream.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c index e50d6caee0..f55365d7c7 100644 --- a/mail/em-html-stream.c +++ b/mail/em-html-stream.c @@ -105,9 +105,12 @@ emhs_sync_write(CamelStream *stream, const char *buffer, size_t n) { EMHTMLStream *emhs = EM_HTML_STREAM (stream); - if (emhs->html_stream == NULL) + if (emhs->html == NULL) return -1; + if (emhs->html_stream == NULL) + emhs->html_stream = gtk_html_begin(emhs->html); + gtk_html_stream_write(emhs->html_stream, buffer, n); return (ssize_t) n; @@ -162,7 +165,7 @@ em_html_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream) g_object_ref(html); new->destroy_id = g_signal_connect(html, "destroy", G_CALLBACK(emhs_gtkhtml_destroy), new); - em_sync_stream_set_buffer_size(&new->sync, 4096); + em_sync_stream_set_buffer_size(&new->sync, 8192); return (CamelStream *)new; } |