summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-page.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tab-page.c b/src/tab-page.c
index 1487c8d..afecdc2 100644
--- a/src/tab-page.c
+++ b/src/tab-page.c
@@ -45,6 +45,7 @@ struct _MqTabPage {
MqApplication *application;
guint64 id;
GtkWidget *label;
+ gboolean title_init;
const gchar *title;
WebKitWebView *web_view;
gulong title_handler_id;
@@ -69,6 +70,7 @@ static void
title_cb(WebKitWebView *web_view, GParamSpec G_GNUC_UNUSED *param_spec,
MqTabPage *tab_page)
{
+ tab_page->title_init = TRUE;
tab_page->title = webkit_web_view_get_title(web_view);
mq_notebook_update_tab_title(
MQ_NOTEBOOK(gtk_widget_get_parent(GTK_WIDGET(tab_page))),
@@ -297,6 +299,9 @@ mq_tab_page_set_title(MqTabPage *tab_page, const gchar *title)
tab_page->title = title;
g_signal_handler_block(tab_page->web_view,
tab_page->title_handler_id);
+ } else if (!tab_page->title_init) {
+ /* Don't clobber "New Tab". */
+ return;
} else {
tab_page->title = webkit_web_view_get_title(tab_page->web_view);
g_signal_handler_unblock(tab_page->web_view,