diff options
author | Adam Williamson <awilliam@redhat.com> | 2023-04-26 09:44:39 -0700 |
---|---|---|
committer | Adam Williamson <awilliam@redhat.com> | 2023-04-26 11:13:14 -0700 |
commit | 15770afebe8aa5e8b367733e1e24c1f08ef10c23 (patch) | |
tree | 3116ec59f4f99de6601b7916610b16e50fb67789 /src | |
parent | 548ca2f19c8d42fbe62e179f5b1cffc0362b4664 (diff) | |
download | zenity-15770afebe8aa5e8b367733e1e24c1f08ef10c23.tar.gz |
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 <awilliam@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/text.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -31,7 +31,7 @@ #include <gio/gio.h> #ifdef HAVE_WEBKITGTK -#include <webkit2/webkit2.h> +#include <webkit/webkit.h> #endif #include <config.h> @@ -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")); |