diff options
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) { |