summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-06 04:16:44 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-06 04:16:44 (EDT)
commitf26adfc58f61f4f6424b2ff2dc845876255adb56 (patch)
tree2462a18264731a5c6fbc29023a2c34bfdcd1427b /src
parente04ac5728204339ec85fee64a48b88e112beeccc (diff)
downloadmarquee-f26adfc58f61f4f6424b2ff2dc845876255adb56.zip
marquee-f26adfc58f61f4f6424b2ff2dc845876255adb56.tar.gz
marquee-f26adfc58f61f4f6424b2ff2dc845876255adb56.tar.bz2
mq_application_get_webkit_settings(): New function
Diffstat (limited to 'src')
-rw-r--r--src/application.c12
-rw-r--r--src/application.h11
2 files changed, 17 insertions, 6 deletions
diff --git a/src/application.c b/src/application.c
index e527391..232bee7 100644
--- a/src/application.c
+++ b/src/application.c
@@ -33,10 +33,9 @@
static void
set_webkit_settings(MqApplication *application)
{
- WebKitSettings *settings;
WebKitWebContext *web_context;
- settings = webkit_settings_new();
+ application->settings = webkit_settings_new();
web_context = webkit_web_context_get_default();
webkit_web_context_set_favicon_database_directory(web_context, NULL);
@@ -46,7 +45,8 @@ set_webkit_settings(MqApplication *application)
(WebKitURISchemeRequestCallback) mq_about_request, application,
NULL);
- mq_web_settings_connect(application->config, settings, web_context);
+ mq_web_settings_connect(application->config, application->settings,
+ web_context);
}
MqApplication *
@@ -79,6 +79,12 @@ mq_application_get_config(MqApplication *application)
return application->config;
}
+WebKitSettings *
+mq_application_get_webkit_settings(MqApplication *application)
+{
+ return application->settings;
+}
+
MqWindow *
mq_application_add_window(MqApplication *application, const gchar **uris)
{
diff --git a/src/application.h b/src/application.h
index 68e5f5e..8fa6f1c 100644
--- a/src/application.h
+++ b/src/application.h
@@ -25,14 +25,16 @@ typedef struct MqApplication MqApplication;
#define MQ_APPLICATION_H
#include <glib.h>
+#include <webkit2/webkit2.h>
#include "config.h"
#include "window.h"
struct MqApplication {
- GList *windows;
- MqConfig *config;
- gboolean marquee_mode;
+ GList *windows;
+ MqConfig *config;
+ WebKitSettings *settings;
+ gboolean marquee_mode;
};
MqApplication *
@@ -44,6 +46,9 @@ mq_application_main(MqApplication *application);
MqConfig *
mq_application_get_config(MqApplication *application);
+WebKitSettings *
+mq_application_get_webkit_settings(MqApplication *application);
+
MqWindow *
mq_application_add_window(MqApplication *application, const gchar **uris);