summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 15:53:44 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 15:53:44 (EDT)
commit504ab61864a067cde3fe471cc28eff5025b0c0b8 (patch)
treed6001a38465a23b8491afe3735c118924c0c820f /src
parente6296ec527b7cd3b9de0197cf48cbfb590a26fd7 (diff)
downloadmarquee-504ab61864a067cde3fe471cc28eff5025b0c0b8.zip
marquee-504ab61864a067cde3fe471cc28eff5025b0c0b8.tar.gz
marquee-504ab61864a067cde3fe471cc28eff5025b0c0b8.tar.bz2
MqWebView: Remove NULL URI handling from ready callback
Diffstat (limited to 'src')
-rw-r--r--src/web-view.c21
1 files changed, 2 insertions, 19 deletions
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);
}
}