diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-06 03:40:41 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-06 03:40:41 (EDT) |
commit | 9123d69accd1455dd2c0863e12f96f4e4e07b35e (patch) | |
tree | 9fed1bda1582f30c615b8400e919780a6d2db1c7 | |
parent | f64b6269c73d492bd35788f67dbb44ad0cb8f249 (diff) | |
download | marquee-9123d69accd1455dd2c0863e12f96f4e4e07b35e.zip marquee-9123d69accd1455dd2c0863e12f96f4e4e07b35e.tar.gz marquee-9123d69accd1455dd2c0863e12f96f4e4e07b35e.tar.bz2 |
MqApplication: Use mq_web_settings_connect()
-rw-r--r-- | src/application.c | 16 |
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, |