summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/application.c16
1 files changed, 4 insertions, 12 deletions
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,