diff --git a/CMakeLists.txt b/CMakeLists.txt index 37e4f892b1..73af9db853 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,15 +206,8 @@ if (WITH_GNUCASH) pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0) set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk") else() - pkg_check_modules (WEBKIT IMPORTED_TARGET webkit2gtk-4.0) - if (NOT WEBKIT_FOUND) - pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-3.0) - set(WEBKIT2_3 1 CACHE INTERNAL "WebKit2Gtk3") - else() - if (NOT WEBKIT2_3) - set(WEBKIT2_4 1 CACHE INTERNAL "WebKit2Gtk4") - endif() - endif() + pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0>2.14.0) + set(WEBKIT2 1 CACHE INTERNAL "WebKit2Gtk4") endif() pkg_check_modules (GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0>=3.18.0) diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in index b66ae22a0e..1dc59e294c 100644 --- a/common/config.h.cmake.in +++ b/common/config.h.cmake.in @@ -353,8 +353,7 @@ #cmakedefine _POSIX_SOURCE 1 /* Definitions for what WEBKIT version we're compiling against: */ -#cmakedefine WEBKIT2_4 1 -#cmakedefine WEBKIT2_3 1 +#cmakedefine WEBKIT2 1 #cmakedefine WEBKIT1 1 /* Definitions for all OS */ diff --git a/gnucash/html/gnc-html-webkit2.c b/gnucash/html/gnc-html-webkit2.c index e5fc12332c..7f211e32f7 100644 --- a/gnucash/html/gnc-html-webkit2.c +++ b/gnucash/html/gnc-html-webkit2.c @@ -101,11 +101,9 @@ static gboolean webkit_decide_policy_cb (WebKitWebView* web_view, static void webkit_mouse_target_cb (WebKitWebView* web_view, WebKitHitTestResult *hit, guint modifiers, gpointer data); -#if WEBKIT_MINOR_VERSION >= 8 static gboolean webkit_notification_cb (WebKitWebView *web_view, WebKitNotification *note, gpointer user_data); -#endif static gboolean webkit_load_failed_cb (WebKitWebView *web_view, WebKitLoadEvent event, gchar *uri, GError *error, @@ -150,12 +148,8 @@ gnc_html_webkit_webview_new (void) webkit_settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (view)); g_object_set (G_OBJECT(webkit_settings), "default-charset", "utf-8", -#if WEBKIT_MINOR_VERSION >= 10 "allow-file-access-from-file-urls", TRUE, -#endif -#if WEBKIT_MINOR_VERSION >= 14 "allow-universal-access-from-file-urls", TRUE, -#endif "enable-java", FALSE, "enable-page-cache", FALSE, "enable-plugins", FALSE, @@ -206,11 +200,9 @@ gnc_html_webkit_init( GncHtmlWebkit* self ) G_CALLBACK (webkit_mouse_target_cb), self); -#if WEBKIT_MINOR_VERSION >= 8 g_signal_connect (priv->web_view, "show-notification", G_CALLBACK (webkit_notification_cb), self); -#endif g_signal_connect (priv->web_view, "load-failed", G_CALLBACK (webkit_load_failed_cb), @@ -671,7 +663,6 @@ webkit_mouse_target_cb (WebKitWebView *web_view, WebKitHitTestResult *hit, priv->base.flyover_cb_data); } } -#if WEBKIT_MINOR_VERSION >= 8 static gboolean webkit_notification_cb (WebKitWebView* web_view, WebKitNotification *note, gpointer user_data) @@ -692,7 +683,6 @@ webkit_notification_cb (WebKitWebView* web_view, WebKitNotification *note, gtk_widget_destroy (dialog); return TRUE; } -#endif static gboolean webkit_load_failed_cb (WebKitWebView *web_view, WebKitLoadEvent event,