diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-29 04:33:16 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-29 04:39:32 (EDT) |
commit | b19444c29d6c205c444cd040c88a289daaedc62a (patch) | |
tree | c6097bda78daf8c582b46bb4d69d70a8ad7903b1 /src | |
parent | 3bc58cbad6e9ae2ff1a3b762653654572508571f (diff) | |
download | marquee-b19444c29d6c205c444cd040c88a289daaedc62a.zip marquee-b19444c29d6c205c444cd040c88a289daaedc62a.tar.gz marquee-b19444c29d6c205c444cd040c88a289daaedc62a.tar.bz2 |
MqTabChrome: Rewrite "about:" URIs
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index dac1340..3fc8674 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -297,8 +297,18 @@ stop_reload_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton, static void uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome) { - webkit_web_view_load_uri(chrome->web_view, - gtk_entry_get_text(GTK_ENTRY(entry))); + const gchar *uri; + gchar *rw_uri; + + uri = gtk_entry_get_text(GTK_ENTRY(entry)); + + if (g_str_has_prefix(uri, "about:")) { + rw_uri = g_strconcat("mq-about:", uri + strlen("about:"), NULL); + webkit_web_view_load_uri(chrome->web_view, rw_uri); + g_free(rw_uri); + } else { + webkit_web_view_load_uri(chrome->web_view, uri); + } } static void |