From 15770afebe8aa5e8b367733e1e24c1f08ef10c23 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 26 Apr 2023 09:44:39 -0700 Subject: Port to webkitgtk 6.0 webkitgtk 5.0 is gone from Fedora 38 and Fedora Rawhide, so our CI 'build_fedora' task is always failing. This ports the code to webkitgtk 6.0 and updates the build and CI configs. I based the changes on Epiphany code. I tested it with: zenity --text-info --html --url=https://www.happyassassin.net and it seems to work OK. Signed-off-by: Adam Williamson --- src/text.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/text.c b/src/text.c index 2e9f2fb..56d8de1 100644 --- a/src/text.c +++ b/src/text.c @@ -31,7 +31,7 @@ #include #ifdef HAVE_WEBKITGTK -#include +#include #endif #include @@ -358,9 +358,13 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) if (text_data->html) { /* "ephemeral" == private browsing */ - g_autoptr(WebKitWebContext) wk_context = webkit_web_context_new_ephemeral (); + g_autoptr(WebKitWebContext) wk_context = webkit_web_context_new (); + g_autoptr(WebKitNetworkSession) wk_session = webkit_network_session_new_ephemeral (); - web_kit = webkit_web_view_new_with_context (wk_context); + web_kit = WEBKIT_WEB_VIEW (g_object_ref_sink (g_object_new (WEBKIT_TYPE_WEB_VIEW, + "web-context", wk_context, + "network-session", wk_session, + NULL))); scrolled_window = GTK_WIDGET ( gtk_builder_get_object (builder, "zenity_text_scrolled_window")); -- cgit v1.2.1