diff options
author | Not Zed <NotZed@Ximian.com> | 2003-10-02 12:26:03 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-10-02 12:26:03 +0800 |
commit | 060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc (patch) | |
tree | f06ea98eef1d84162a0059bf0df3357179d22267 /mail/em-format-html.c | |
parent | 14cc184b53748a8dd504755415ea0f460073dedf (diff) | |
download | gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar.gz gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar.bz2 gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar.lz gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar.xz gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.tar.zst gsoc2013-evolution-060d4b7e0a682d2e70a5275d8db1ea2f5fb488cc.zip |
turn off blocking writes. (efh_format_timeout): don't do a htmlbegin on
2003-10-01 Not Zed <NotZed@Ximian.com>
* 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
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r-- | mail/em-format-html.c | 24 |
1 files changed, 10 insertions, 14 deletions
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, "<table><tr><td><tt>\n"); + camel_stream_write_string(stream, "<tt>\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, "</tt></td></tr></table>\n"); + camel_stream_write_string(stream, "</tt>\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, "</body>\n</html>\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, "</body>\n</html>\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) { |