Components.WebView: Fix CI failure building with WebKitGTK >= 2.31

The `webkit_settings_set_enable_plugins` method has been deprecated in
2.31, and calling it emits a warning which trips up the test suite.
This commit is contained in:
Michael Gratton 2021-01-14 21:56:17 +11:00
parent d76d838e5d
commit 2892189094
2 changed files with 6 additions and 0 deletions

View file

@ -325,7 +325,9 @@ public abstract class Components.WebView : WebKit.WebView, Geary.BaseInterface {
setts.enable_media_stream = false;
setts.enable_offline_web_application_cache = false;
setts.enable_page_cache = false;
#if WEBKIT_PLUGINS_SUPPORTED
setts.enable_plugins = false;
#endif
setts.hardware_acceleration_policy =
WebKit.HardwareAccelerationPolicy.NEVER;
setts.javascript_can_access_clipboard = true;

View file

@ -192,6 +192,10 @@ client_vala_args += [
)
]
if webkit2gtk.version().version_compare('<2.31')
client_vala_args += [ '--define=WEBKIT_PLUGINS_SUPPORTED' ]
endif
# Main client application library
client_lib = shared_library(
client_package,