summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-28 15:12:49 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-28 15:12:49 (EDT)
commitda4ce433c1c011e74e3e80bb19e320963d67497f (patch)
tree6627e2c152caf9c997442105db0ea0b922c0412e
parent9e9700de980e695a54493a879610eff8b4cd57aa (diff)
downloadmarquee-da4ce433c1c011e74e3e80bb19e320963d67497f.zip
marquee-da4ce433c1c011e74e3e80bb19e320963d67497f.tar.gz
marquee-da4ce433c1c011e74e3e80bb19e320963d67497f.tar.bz2
mq_window_update_tab_title(): New function
-rw-r--r--src/window.c8
-rw-r--r--src/window.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index b64e1b1..6a44ae1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -126,3 +126,11 @@ mq_window_get_current_tab(MqWindow *window)
{
return window->current_tab;
}
+
+void
+mq_window_update_tab_title(MqWindow *window, guint position, const gchar *title)
+{
+ if (position == window->current_tab) {
+ set_title(window, title);
+ }
+}
diff --git a/src/window.h b/src/window.h
index 03cd327..24cd8a1 100644
--- a/src/window.h
+++ b/src/window.h
@@ -50,4 +50,8 @@ mq_window_insert_tab(MqWindow *window, GtkWidget *tab_page,
guint
mq_window_get_current_tab(MqWindow *window);
+void
+mq_window_update_tab_title(MqWindow *window, guint position,
+ const gchar *title);
+
#endif