From 060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 2 Oct 2003 04:26:03 +0000 Subject: turn off blocking writes. (efh_format_timeout): don't do a htmlbegin on 2003-10-01 Not Zed * em-format-html.c (efh_init): turn off blocking writes. (efh_format_timeout): don't do a htmlbegin on the page yet, it'll be handled by em-html-stream when it has data, to reduce flicker. (efh_format_do): close the main gtkhtml stream as soon as we're done writing the body. any sub-jobs should be using frames etc. (efh_text_plain): dont write a table around the text, try to reduce flickering. layout may be out now though. * em-html-stream.c (emhs_sync_write): if we have no html_stream yet, begin a new one. svn path=/trunk/; revision=22784 --- mail/em-format-html.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 32f763311d..63f7f7f695 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -119,7 +119,7 @@ efh_init(GObject *o) efh->priv->text_inline_parts = g_hash_table_new(NULL, NULL); efh->html = (GtkHTML *)gtk_html_new(); - gtk_html_set_blocking (efh->html, TRUE); + gtk_html_set_blocking(efh->html, FALSE); g_object_ref(efh->html); gtk_object_sink((GtkObject *)efh->html); @@ -609,10 +609,10 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo type = camel_mime_part_get_content_type(newpart); if (camel_content_type_is (type, "text", "plain")) { - camel_stream_write_string(stream, "
\n"); + camel_stream_write_string(stream, "\n"); em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, camel_medium_get_content_object((CamelMedium *)newpart)); camel_stream_flush((CamelStream *)filtered_stream); - camel_stream_write_string(stream, "
\n"); + camel_stream_write_string(stream, "\n"); } else { em_format_part((EMFormat *)efh, stream, newpart); } @@ -1086,7 +1086,11 @@ static void efh_format_do(struct _mail_msg *mm) em_format_format_source((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message); else em_format_format_message((EMFormat *)m->format, (CamelStream *)m->estream, m->message); - camel_stream_flush((CamelStream *)m->estream); + + camel_stream_write_string((CamelStream *)m->estream, "\n\n"); + camel_stream_close((CamelStream *)m->estream); + camel_object_unref(m->estream); + m->estream = NULL; puri_level = ((EMFormat *)m->format)->pending_uri_level; base = ((EMFormat *)m->format)->base; @@ -1117,20 +1121,11 @@ static void efh_format_do(struct _mail_msg *mm) camel_url_free(job->base); g_free(job); - /* incase anything got added above, force it through */ - camel_stream_flush((CamelStream *)m->estream); - g_mutex_lock(m->format->priv->lock); } g_mutex_unlock(m->format->priv->lock); d(printf("out of jobs, done\n")); - camel_stream_write_string((CamelStream *)m->estream, "\n\n"); - - camel_stream_close((CamelStream *)m->estream); - camel_object_unref(m->estream); - m->estream = NULL; - ((EMFormat *)m->format)->pending_uri_level = puri_level; } @@ -1198,7 +1193,8 @@ efh_format_timeout(struct _format_msg *m) gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK); mail_msg_free(m); } else { - hstream = gtk_html_begin(efh->html); + /*hstream = gtk_html_begin(efh->html);*/ + hstream = NULL; m->estream = (EMHTMLStream *)em_html_stream_new(efh->html, hstream); if (p->last_part == m->message) { -- cgit v1.2.3