From 9123d69accd1455dd2c0863e12f96f4e4e07b35e Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 06 Oct 2017 03:40:41 -0400 Subject: MqApplication: Use mq_web_settings_connect() --- (limited to 'src') diff --git a/src/application.c b/src/application.c index fa7ec90..e527391 100644 --- a/src/application.c +++ b/src/application.c @@ -26,23 +26,17 @@ #include "application.h" #include "config.h" +#include "web-settings.h" #include "about.h" #include "window.h" -#define GET_BOOL(MQ_NAME) mq_config_get_boolean(application->config, MQ_NAME) -#define MAP_BOOL( WK_NAME, MQ_NAME) WK_NAME, GET_BOOL(MQ_NAME) -#define MAP_BOOL_N(WK_NAME, MQ_NAME) WK_NAME, GET_BOOL(MQ_NAME) - static void set_webkit_settings(MqApplication *application) { WebKitSettings *settings; WebKitWebContext *web_context; - settings = webkit_settings_new_with_settings( - MAP_BOOL("enable-smooth-scrolling", - "navigation.smooth-scrolling"), - NULL); + settings = webkit_settings_new(); web_context = webkit_web_context_get_default(); webkit_web_context_set_favicon_database_directory(web_context, NULL); @@ -51,11 +45,9 @@ set_webkit_settings(MqApplication *application) webkit_web_context_register_uri_scheme(web_context, "mq-about", (WebKitURISchemeRequestCallback) mq_about_request, application, NULL); -} -#undef GET_BOOL -#undef MAP_BOOL -#undef MAP_BOOL_N + mq_web_settings_connect(application->config, settings, web_context); +} MqApplication * mq_application_new(gchar __attribute__((unused)) *profile, -- cgit v0.9.1