summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 02:26:40 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 02:26:40 (EDT)
commit6770dc83132d6a01f05d60a4374e44f6ac520838 (patch)
tree87ac963c37606066ee407ef227663609c8752d1f /src
parent4e6d3802bb2dea8b55d92541d26306e2b6128704 (diff)
downloadmarquee-6770dc83132d6a01f05d60a4374e44f6ac520838.zip
marquee-6770dc83132d6a01f05d60a4374e44f6ac520838.tar.gz
marquee-6770dc83132d6a01f05d60a4374e44f6ac520838.tar.bz2
src/tab-chrome.c: Update tab label on Web view title change
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 169a8a0..a2571eb 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -125,6 +125,14 @@ uri_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
}
static void
+title_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
+ MqTabChrome *chrome)
+{
+ gtk_label_set_text(GTK_LABEL(chrome->tab_label),
+ webkit_web_view_get_title(web_view));
+}
+
+static void
connect_web_view(MqTabChrome *chrome)
{
g_signal_connect(chrome->web_view, "load-changed",
@@ -133,6 +141,8 @@ connect_web_view(MqTabChrome *chrome)
G_CALLBACK(load_progress_cb), chrome);
g_signal_connect(chrome->web_view, "notify::uri",
G_CALLBACK(uri_cb), chrome);
+ g_signal_connect(chrome->web_view, "notify::title",
+ G_CALLBACK(title_cb), chrome);
}
void