summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-10-03 19:08:09 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-10-03 19:08:09 (EDT)
commit4272057e7341b630dbe0f33ba5b62d38fb31d776 (patch)
tree500e4d2d83925bc444ac8c11f5557b2a1b6528e4 /src
parent308d8e9bad8f9821952699accb029341c26ea338 (diff)
downloadmarquee-4272057e7341b630dbe0f33ba5b62d38fb31d776.zip
marquee-4272057e7341b630dbe0f33ba5b62d38fb31d776.tar.gz
marquee-4272057e7341b630dbe0f33ba5b62d38fb31d776.tar.bz2
MqTabPage: Don't clobber "New Tab" when renaming a new tab
Diffstat (limited to 'src')
-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,