summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tab-body.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tab-body.c b/src/tab-body.c
index 54bbd17..85f7e45 100644
--- a/src/tab-body.c
+++ b/src/tab-body.c
@@ -479,7 +479,9 @@ MqTabBody *
mq_tab_body_new(MqTab *tab, const gchar *uri)
{
MqTabBody *body;
- gchar *rw_uri;
+ gchar *rw_uri;
+ MqConfig *config;
+ gchar *new_tab_page;
body = malloc(sizeof(*body));
body->tab = tab;
@@ -497,6 +499,17 @@ mq_tab_body_new(MqTab *tab, const gchar *uri)
} else {
webkit_web_view_load_uri(body->web_view, uri);
}
+ } else {
+ config = mq_application_get_config(mq_tab_get_application(tab));
+ new_tab_page = mq_config_get_string(config, "tabs.new");
+ if (g_strcmp0(new_tab_page, "home") == 0) {
+ webkit_web_view_load_uri(body->web_view,
+ mq_config_get_string(config, "tabs.home"));
+ } else if (g_strcmp0(new_tab_page, "blank") == 0) {
+ /* Don't load any URI. */
+ } else {
+ g_assert_not_reached();
+ }
}
body->container = GTK_WIDGET(body->web_view);