From 504ab61864a067cde3fe471cc28eff5025b0c0b8 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 30 Oct 2017 15:53:44 -0400 Subject: MqWebView: Remove NULL URI handling from ready callback --- (limited to 'src') diff --git a/src/web-view.c b/src/web-view.c index 91ead87..9152c27 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -63,26 +63,9 @@ G_DEFINE_TYPE(MqWebView, mq_web_view, WEBKIT_TYPE_WEB_VIEW) static void ready_cb(MqWebViewScheme *scheme, MqWebView *web_view) { - gchar *rw_uri; - gchar *new_tab_page; - if (web_view->uri) { - rw_uri = web_view->scheme_methods->rewrite_uri( - web_view, scheme, web_view->uri); - webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), rw_uri); - g_free(rw_uri); - } else { - new_tab_page = mq_config_get_string(web_view->config, - "tabs.new"); - if (g_strcmp0(new_tab_page, "home") == 0) { - webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), - mq_config_get_string(web_view->config, - "tabs.home")); - } else if (g_strcmp0(new_tab_page, "blank") == 0) { - /* Don't load any URI. */ - } else { - g_assert_not_reached(); - } + webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), + web_view->uri); } } -- cgit v0.9.1