Remove support on Linux/BSD for ancient versions of WebKitGtk.

Still supporting 2.4.11 on Mac/Win.
This commit is contained in:
John Ralls 2020-04-24 14:22:18 -07:00
parent 758bd7b656
commit 396ddbd472
3 changed files with 3 additions and 21 deletions

View File

@ -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)

View File

@ -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 */

View File

@ -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,