summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-04 22:42:47 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-04 22:42:47 (EDT)
commit253a2ef29ef698f3c89b5c8453551deac091f0c7 (patch)
tree4e8b5e9c42a946a3d9f2f0aa7f0a7620408073a1
parent9b0e11f239c6fc380f8bdbfc734d7b12e1df25e1 (diff)
downloadmarquee-253a2ef29ef698f3c89b5c8453551deac091f0c7.zip
marquee-253a2ef29ef698f3c89b5c8453551deac091f0c7.tar.gz
marquee-253a2ef29ef698f3c89b5c8453551deac091f0c7.tar.bz2
MqApplication: Use MqConfig
-rw-r--r--src/application.c9
-rw-r--r--src/application.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c
index f3061a3..0cf19c4 100644
--- a/src/application.c
+++ b/src/application.c
@@ -25,6 +25,7 @@
#include <webkit2/webkit2.h>
#include "application.h"
+#include "config.h"
#include "about.h"
#include "window.h"
@@ -36,6 +37,8 @@ mq_application_new(gchar __attribute__((unused)) *profile,
WebKitWebContext *web_context;
application = malloc(sizeof(*application));
+ application->config = mq_config_new("default");
+ mq_config_load(application->config);
application->windows = NULL;
web_context = webkit_web_context_get_default();
@@ -57,6 +60,12 @@ mq_application_main(MqApplication __attribute__((unused)) *application)
return EXIT_SUCCESS;
}
+MqConfig *
+mq_application_get_config(MqApplication *application)
+{
+ return application->config;
+}
+
MqWindow *
mq_application_add_window(MqApplication *application, const gchar **uris)
{
diff --git a/src/application.h b/src/application.h
index 901fd22..68e5f5e 100644
--- a/src/application.h
+++ b/src/application.h
@@ -26,10 +26,12 @@ typedef struct MqApplication MqApplication;
#include <glib.h>
+#include "config.h"
#include "window.h"
struct MqApplication {
GList *windows;
+ MqConfig *config;
gboolean marquee_mode;
};
@@ -39,6 +41,9 @@ mq_application_new(gchar *profile, gboolean private);
int
mq_application_main(MqApplication *application);
+MqConfig *
+mq_application_get_config(MqApplication *application);
+
MqWindow *
mq_application_add_window(MqApplication *application, const gchar **uris);