[balsa] html: WebKit deprecation cleanup
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] html: WebKit deprecation cleanup
- Date: Thu, 25 Mar 2021 16:24:43 +0000 (UTC)
commit 5ec1c8c41e6b0da826d01d2c7adf2b36a96ba1dd
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Mar 25 12:18:30 2021 -0400
html: WebKit deprecation cleanup
* libbalsa/html.c
(lbh_web_view_new):
webkit_settings_set_enable_plugins() is deprecated in 2.32 (we test for 2.31.91).
ChangeLog | 8 ++++++++
libbalsa/html.c | 4 ++++
2 files changed, 12 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index 3654310ab..1f737f9ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-03-25 Peter Bloomfield <pbloomfield bellsouth net>
+
+ html: WebKit deprecation cleanup
+
+ * libbalsa/html.c (lbh_web_view_new):
+ webkit_settings_set_enable_plugins() is deprecated in 2.32 (we
+ test for 2.31.91).
+
2021-03-22 Peter Bloomfield <pbloomfield bellsouth net>
mailbox: Lock destination when copying or moving
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 6a0f14fbc..0822a0575 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -602,7 +602,11 @@ lbh_web_view_new(LibBalsaWebKitInfo *info,
gtk_widget_set_vexpand(GTK_WIDGET(view), TRUE);
settings = webkit_web_view_get_settings(view);
+#if WEBKIT_CHECK_VERSION(2, 31, 91)
+ g_object_set(G_OBJECT(settings), "enable-plugins", FALSE, NULL);
+#else /* WEBKIT_CHECK_VERSION(2, 31, 91) */
webkit_settings_set_enable_plugins(settings, FALSE);
+#endif /* WEBKIT_CHECK_VERSION(2, 31, 91) */
webkit_settings_set_enable_javascript(settings, FALSE);
webkit_settings_set_enable_java(settings, FALSE);
webkit_settings_set_enable_hyperlink_auditing(settings, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]