[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-433-g8889f7735
paul at claws-mail.org
paul at claws-mail.org
Wed Mar 23 11:52:11 UTC 2022
The branch, gtk3 has been updated
via 8889f77355843df2a36d17c7a3a43277e6493de3 (commit)
from 4ed0ccbdc08cee84aaeff102b6d6eaed29346b53 (commit)
Summary of changes:
src/plugins/fancy/fancy_viewer.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit 8889f77355843df2a36d17c7a3a43277e6493de3
Author: paul <paul at claws-mail.org>
Date: Wed Mar 23 11:52:06 2022 +0000
fix bug 4577, 'Fancy plugin with GTK3 seems to ignore content encoding'
diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index 49c7769b6..6701e8bd9 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -1,7 +1,7 @@
/*
* Claws Mail -- A GTK based, lightweight, and fast e-mail client
* == Fancy Plugin ==
- * Copyright(C) 1999-2021 the Claws Mail Team
+ * Copyright(C) 1999-2022 the Claws Mail Team
* This file Copyright (C) 2009-2014 Salvatore De Paolis
* <iwkse at claws-mail.org> and the Claws Mail Team
*
@@ -284,8 +284,10 @@ static gboolean fancy_set_contents(FancyViewer *viewer, gboolean use_defaults)
else {
const gchar *charset = NULL;
gchar *contents = NULL;
- gdouble zoom_level;
- zoom_level = (double) fancy_prefs.zoom_level / 100;
+ GBytes *content_bytes;
+ gdouble zoom_level;
+ zoom_level = (double) fancy_prefs.zoom_level / 100;
+
if (messageview && messageview->forced_charset)
charset = ((MimeViewer *)viewer)->mimeview->messageview->forced_charset;
else
@@ -294,7 +296,7 @@ static gboolean fancy_set_contents(FancyViewer *viewer, gboolean use_defaults)
charset = conv_get_locale_charset_str();
debug_print("using %s charset\n", charset);
g_object_set(viewer->settings, "default-charset", charset, NULL);
-
+
if (use_defaults) {
debug_print("zoom_level: %f\n", zoom_level);
@@ -304,10 +306,14 @@ static gboolean fancy_set_contents(FancyViewer *viewer, gboolean use_defaults)
}
contents = file_read_to_str_no_recode(viewer->filename);
- webkit_web_view_load_html(viewer->view,
- contents,
- NULL);
+ content_bytes = g_bytes_new(contents, strlen(contents));
+ webkit_web_view_load_bytes(viewer->view,
+ content_bytes,
+ "text/html",
+ charset,
+ NULL);
g_free(contents);
+ g_bytes_unref(content_bytes);
}
return FALSE;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list