summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 02:37:58 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 02:37:58 (EDT)
commitc9f6932f455139cbe5653a124410b897c395cc4e (patch)
tree23c5b843674699ecec2f4291a60f5b9118192570 /src
parent2eba9f0506ec864a8cd29e9db1f6761b50c70a16 (diff)
downloadmarquee-c9f6932f455139cbe5653a124410b897c395cc4e.zip
marquee-c9f6932f455139cbe5653a124410b897c395cc4e.tar.gz
marquee-c9f6932f455139cbe5653a124410b897c395cc4e.tar.bz2
src/tab-chrome.c: Factor out label updating into new function
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index c03f393..c61d30e 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -90,6 +90,13 @@ mq_tab_chrome_get_container(MqTabChrome *chrome)
return chrome->container;
}
+static void
+update_tab_label(MqTabChrome *chrome)
+{
+ gtk_label_set_text(GTK_LABEL(chrome->tab_label),
+ webkit_web_view_get_title(chrome->web_view));
+}
+
void
mq_tab_chrome_update_tab_position(MqTabChrome *chrome, guint position)
{
@@ -131,11 +138,10 @@ uri_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
}
static void
-title_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
- MqTabChrome *chrome)
+title_cb(WebKitWebView __attribute__((unused)) *web_view,
+ GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
{
- gtk_label_set_text(GTK_LABEL(chrome->tab_label),
- webkit_web_view_get_title(web_view));
+ update_tab_label(chrome);
}
static void