diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/web-view.c b/src/web-view.c index 9152c27..bf8a256 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -198,6 +198,7 @@ static void constructed(GObject *object) { MqWebView *web_view; + gchar *new_tab_page; if (G_OBJECT_CLASS(mq_web_view_parent_class)->constructed) { G_OBJECT_CLASS(mq_web_view_parent_class)->constructed(object); @@ -212,6 +213,19 @@ constructed(GObject *object) mq_application_get_webkit_settings( mq_tab_page_get_application(web_view->tab_page))); + if (!web_view->uri) { + new_tab_page = mq_config_get_string(web_view->config, + "tabs.new"); + if (g_strcmp0(new_tab_page, "home") == 0) { + web_view->uri = 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(); + } + } + mq_web_view_scheme_set_methods(&web_view->scheme_methods, &web_view->scheme, web_view->uri); |