summaryrefslogtreecommitdiffstats
path: root/src/web-view-schemes/normal.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 12:57:58 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 12:57:58 (EDT)
commitbab53ac616646ef9cda01377c4516a473c5f6582 (patch)
tree25fb643f0bf86279e5e4a1a0dfc223d477a84671 /src/web-view-schemes/normal.c
parentc7aef4e0b8290c83c4b086bc87d76e86d48dae14 (diff)
downloadmarquee-bab53ac616646ef9cda01377c4516a473c5f6582.zip
marquee-bab53ac616646ef9cda01377c4516a473c5f6582.tar.gz
marquee-bab53ac616646ef9cda01377c4516a473c5f6582.tar.bz2
mq_web_view_*_scheme_methods->match_uri(): New methods
Diffstat (limited to 'src/web-view-schemes/normal.c')
-rw-r--r--src/web-view-schemes/normal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/web-view-schemes/normal.c b/src/web-view-schemes/normal.c
index 4da54cc..0d96fea 100644
--- a/src/web-view-schemes/normal.c
+++ b/src/web-view-schemes/normal.c
@@ -528,6 +528,14 @@ save_html_replace_cb(GFile *file, GAsyncResult *result, guchar *data)
g_free(data);
}
+static gboolean
+match_uri(const gchar *uri)
+{
+ /* This is a catch-all scheme handler, so match any schemes not handled
+ * by another handler. */
+ return !g_str_has_prefix(uri, "view-source:");
+}
+
static void
save_html_get_data_cb(WebKitWebResource *resource, GAsyncResult *result,
MqWebView *web_view)
@@ -770,6 +778,7 @@ save_file(MqWebView *web_view, MqWebViewScheme *scheme)
}
const MqWebViewSchemeMethods mq_web_view_normal_scheme_methods = {
+ .match_uri = match_uri,
.finalize = finalize,
.rewrite_uri = rewrite_uri,
.display_uri = display_uri,