diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-06 19:06:16 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-06 19:06:16 (EDT) |
commit | 8c4972f379e07e0f3ac4fa6885c011fdada0c128 (patch) | |
tree | e93b8df412b1eb93c0731a8c9de59f6aa616122a /src | |
parent | cb64d6cd63365d7041c22b76d54886850782acdd (diff) | |
download | marquee-8c4972f379e07e0f3ac4fa6885c011fdada0c128.zip marquee-8c4972f379e07e0f3ac4fa6885c011fdada0c128.tar.gz marquee-8c4972f379e07e0f3ac4fa6885c011fdada0c128.tar.bz2 |
mq_tab_body_new(): Improve URI loading logic
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-body.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tab-body.c b/src/tab-body.c index 1bdcebb..54bbd17 100644 --- a/src/tab-body.c +++ b/src/tab-body.c @@ -488,14 +488,15 @@ mq_tab_body_new(MqTab *tab, const gchar *uri) mq_application_get_webkit_settings( mq_tab_get_application(tab)))); - if (uri && g_str_has_prefix(uri, "about:")) { - rw_uri = g_strconcat("mq-about:", uri + strlen("about:"), NULL); - } else { - rw_uri = g_strdup(uri); - } - if (rw_uri) { - webkit_web_view_load_uri(body->web_view, rw_uri); - g_free(rw_uri); + if (uri) { + if (g_str_has_prefix(uri, "about:")) { + rw_uri = g_strconcat("mq-about:", + uri + strlen("about:"), NULL); + webkit_web_view_load_uri(body->web_view, rw_uri); + g_free(rw_uri); + } else { + webkit_web_view_load_uri(body->web_view, uri); + } } body->container = GTK_WIDGET(body->web_view); |