[evolution/webkit] Always load images in header webviews
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit] Always load images in header webviews
- Date: Mon, 2 Jan 2012 09:05:07 +0000 (UTC)
commit 4c1655a8ded1726dac4d0961316012b7f5343de6
Author: Dan VrÃtil <dan progdan cz>
Date: Thu Dec 22 11:48:50 2011 +0100
Always load images in header webviews
mail/e-mail-display.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index c8b03e8..9afb138 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -545,7 +545,8 @@ mail_display_install_js_callbacks (WebKitWebView *web_view,
}
static EWebView*
-mail_display_setup_webview (EMailDisplay *display)
+mail_display_setup_webview (EMailDisplay *display,
+ gboolean is_header)
{
EWebView *web_view;
WebKitWebSettings *settings;
@@ -569,7 +570,9 @@ mail_display_setup_webview (EMailDisplay *display)
G_CALLBACK (mail_display_webkit_finished), NULL);
settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view));
- if (em_format_html_can_load_images (display->priv->formatter))
+ /* When webviews holds headers or attached image then the can_load_images option
+ does not apply */
+ if (em_format_html_can_load_images (display->priv->formatter) || is_header)
g_object_set (G_OBJECT (settings), "auto-load-images", TRUE, NULL);
else
g_object_set (G_OBJECT (settings), "auto-load-images", FALSE, NULL);
@@ -656,7 +659,7 @@ mail_display_load_as_source (EMailDisplay *display,
e_mail_display_clear (display);
- web_view = mail_display_setup_webview (display);
+ web_view = mail_display_setup_webview (display, TRUE);
mail_display_insert_web_view (display, web_view);
uri = em_format_build_mail_uri (emf->folder, emf->message_uid,
@@ -813,7 +816,8 @@ mail_display_load_normal (EMailDisplay *display,
if ((!puri->is_attachment && puri->write_func) || (puri->is_attachment && puri->write_func && puri->widget_func)) {
GtkWidget *container;
- web_view = mail_display_setup_webview (display);
+
+ web_view = mail_display_setup_webview (display, g_str_has_suffix (puri->uri, ".headers"));
container = mail_display_insert_web_view (display, web_view);
e_web_view_load_uri (web_view, uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]