From feda98f9c3ecadeaf364f16c12d112e19ce7183f Mon Sep 17 00:00:00 2001
From: Patrick McDermott <pj@pehjota.net>
Date: Fri, 29 Sep 2017 18:06:25 -0400
Subject: about: Make path handlers send responses to WK

---
(limited to 'src/about')

diff --git a/src/about/marquee.c b/src/about/marquee.c
index 70413aa..c076e24 100644
--- a/src/about/marquee.c
+++ b/src/about/marquee.c
@@ -20,9 +20,11 @@
  */
 
 #include <glib.h>
+#include <webkit2/webkit2.h>
 
 #include "paths.h"
 #include "../application.h"
+#include "../about.h"
 
 const gchar *document =
 	"<!doctype html>"
@@ -38,8 +40,9 @@ const gchar *document =
 		"</body>"
 	"</html>";
 
-gchar *
-mq_about_marquee_response(MqApplication *application, GHashTable *query)
+void
+mq_about_marquee_response(MqApplication *application, GHashTable *query,
+	WebKitURISchemeRequest *request)
 {
 	if (query && g_hash_table_lookup(query, "toggle")) {
 		if (mq_application_marquee_mode_on(application)) {
@@ -49,6 +52,6 @@ mq_about_marquee_response(MqApplication *application, GHashTable *query)
 		}
 	}
 
-	return g_strdup_printf(document,
-		"DANGER", "DO NOT PRESS");
+	mq_about_response(request, g_strdup_printf(document,
+		"DANGER", "DO NOT PRESS"));
 }
diff --git a/src/about/paths.h b/src/about/paths.h
index ec365d1..e3c2434 100644
--- a/src/about/paths.h
+++ b/src/about/paths.h
@@ -26,7 +26,8 @@
 
 #include "../application.h"
 
-gchar *
-mq_about_marquee_response(MqApplication *application, GHashTable *query);
+void
+mq_about_marquee_response(MqApplication *application, GHashTable *query,
+	WebKitURISchemeRequest *request);
 
 #endif
--
cgit v0.9.1