diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-31 02:03:00 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-31 02:03:00 (EDT) |
commit | ac5cb15280deee617b01daf6455c2c87a28a0fe0 (patch) | |
tree | 453c0d09ce5658023babb50982163cc961be8df0 | |
parent | 3f5f19387218f22c7a0f4c2135d06134ab1d0da8 (diff) | |
download | marquee-ac5cb15280deee617b01daf6455c2c87a28a0fe0.zip marquee-ac5cb15280deee617b01daf6455c2c87a28a0fe0.tar.gz marquee-ac5cb15280deee617b01daf6455c2c87a28a0fe0.tar.bz2 |
view-source: Show origin URI in title
-rw-r--r-- | src/view-source.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/view-source.c b/src/view-source.c index 71d3438..3c46127 100644 --- a/src/view-source.c +++ b/src/view-source.c @@ -50,7 +50,8 @@ static const gchar *document = "</html>\n"; static void -respond(WebKitURISchemeRequest *request, guchar *data, gsize length) +respond(WebKitURISchemeRequest *request, const gchar *uri, guchar *data, + gsize length) { gchar *escaped_data; GInputStream *stream; @@ -61,7 +62,7 @@ respond(WebKitURISchemeRequest *request, guchar *data, gsize length) g_strdup_printf(document, gtk_widget_get_default_direction() == GTK_TEXT_DIR_RTL ? "rtl" : "ltr", - "TODO", escaped_data), -1, g_free); + uri, escaped_data), -1, g_free); webkit_uri_scheme_request_finish(request, stream, -1, "text/html"); g_object_unref(stream); @@ -75,7 +76,7 @@ data_cb(MqWebView *web_view, GParamSpec G_GNUC_UNUSED *param_spec, gsize length; data = mq_web_view_get_data(web_view, &length); - respond(data_signal_data->request, data, length); + respond(data_signal_data->request, data_signal_data->uri, data, length); g_signal_handler_disconnect(web_view, data_signal_data->handler_id); g_free(data_signal_data->uri); g_free(data_signal_data); @@ -111,7 +112,7 @@ mq_view_source_request(WebKitURISchemeRequest *request, /* Get origin tab's data. */ data = mq_web_view_get_data(origin_web_view, &length); if (data) { - respond(request, data, length); + respond(request, uri, data, length); } else { data_signal_data = g_new(DataSignalData, 1); data_signal_data->request = request; |