From 5f111781ba3bfe0ec6780ebf1e36e03b8db606d1 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 01:22:09 -0400 Subject: MqTabChrome: Use mq_web_view_load_uri() This is instead of calling webkit_web_view_load_uri() with a possibly "about:"-rewritten URI. --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 3a57f4b..427d7b4 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -298,17 +298,10 @@ static void uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome) { 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); - } + mq_web_view_load_uri(MQ_WEB_VIEW(chrome->web_view), uri); } static void @@ -316,17 +309,10 @@ home_clicked_cb(GtkToolButton G_GNUC_UNUSED *toolbutton, MqTabChrome *chrome) { const gchar *uri; - gchar *rw_uri; uri = mq_config_get_string(chrome->config, "tabs.home"); - 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); - } + mq_web_view_load_uri(MQ_WEB_VIEW(chrome->web_view), uri); } static void -- cgit v0.9.1