summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 22:56:52 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 22:56:52 (EDT)
commitc18e6aaed8caa69eba141b4a4894d12df37dda40 (patch)
treeb578800ee5532c4e44cee445f653d17282050d2c
parent5aeb788c3046ab5134691843b40d6318b14d5aa2 (diff)
downloadmarquee-c18e6aaed8caa69eba141b4a4894d12df37dda40.zip
marquee-c18e6aaed8caa69eba141b4a4894d12df37dda40.tar.gz
marquee-c18e6aaed8caa69eba141b4a4894d12df37dda40.tar.bz2
mq_web_view_scheme_set_methods(): Call new scheme's initialize() method
-rw-r--r--src/web-view-schemes/methods.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/web-view-schemes/methods.c b/src/web-view-schemes/methods.c
index 9fb6896..0a682a3 100644
--- a/src/web-view-schemes/methods.c
+++ b/src/web-view-schemes/methods.c
@@ -22,14 +22,15 @@
#include "schemes.h"
static gboolean
-check_and_set_methods(MqWebViewSchemeMethods **methods,
- MqWebViewScheme *scheme, const gchar *uri,
+check_and_set_methods(MqWebView *web_view, MqWebViewScheme *scheme,
+ MqWebViewSchemeMethods **methods, const gchar *uri,
MqWebViewSchemeMethods *scheme_methods)
{
if (scheme_methods->match_uri(uri)) {
if (*methods) {
(*methods)->finalize(scheme);
}
+ scheme_methods->initialize(web_view, scheme, uri);
*methods = scheme_methods;
return TRUE;
} else {
@@ -44,9 +45,9 @@ mq_web_view_scheme_set_methods(MqWebView *web_view, MqWebViewScheme *scheme,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
- check_and_set_methods(methods, scheme, uri,
+ check_and_set_methods(web_view, scheme, methods, uri,
&mq_web_view_normal_scheme_methods) ||
- check_and_set_methods(methods, scheme, uri,
+ check_and_set_methods(web_view, scheme, methods, uri,
&mq_web_view_view_source_scheme_methods);
#pragma GCC diagnostic pop