[evolution/webkit] Fix displaying emails that are already parsed
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit] Fix displaying emails that are already parsed
- Date: Tue, 20 Dec 2011 08:58:48 +0000 (UTC)
commit fa530b2dab07bb7c3dfa37c3bf30314fa3bd311d
Author: Dan VrÃtil <dvratil redhat com>
Date: Tue Dec 20 09:58:49 2011 +0100
Fix displaying emails that are already parsed
This was broken when making EMFormat running asynchronously. The EMailDisplay was correctly
loaded when the async callback was finished, but it was not loaded when the message was
already stored parsed in WebKitSession.
mail/e-mail-reader.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 8b4674d..7eafa6c 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2632,18 +2632,18 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
EM_FORMAT (formatter)->message_uid = g_strdup (message_uid);
EM_FORMAT (formatter)->uri_base = g_strdup (mail_uri);
- /* Parse the message.
- * FIXME WEBKIT: This should probably be asynchronous since it
- * can block for some time...*/
cancellable = e_activity_get_cancellable (closure->activity);
em_format_parse_async (EM_FORMAT (formatter), message, folder,
cancellable, format_parser_async_done_cb, reader);
g_hash_table_insert (formatters, g_strdup (mail_uri), formatter);
} else {
- /* Add reference that would be otherwise added when
- * the formatter is created */
- g_object_ref (formatter);
+ EMailDisplay *display;
+
+ display = e_mail_reader_get_mail_display (reader);
+
+ e_mail_display_set_formatter (display, EM_FORMAT_HTML (formatter));
+ e_mail_display_load (display, EM_FORMAT (formatter)->uri_base);
}
/* Reset the shell view icon. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]