From c9f6932f455139cbe5653a124410b897c395cc4e Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Sep 2017 02:37:58 -0400 Subject: src/tab-chrome.c: Factor out label updating into new function --- (limited to 'src') 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 -- cgit v0.9.1