summaryrefslogtreecommitdiffstats
path: root/src/notebook.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notebook.c')
-rw-r--r--src/notebook.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c
index 3521c93..1a33a4c 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -42,6 +42,7 @@ struct _MqNotebook {
MqWindow *window;
MqTabTree *tree;
MqTabTree *found_node;
+ MqTabPage *current_page;
};
enum {
@@ -118,6 +119,8 @@ static void
switch_page_cb(MqNotebook *notebook, MqTabPage *page,
guint G_GNUC_UNUSED page_num)
{
+ notebook->current_page = page;
+
mq_window_set_title(notebook->window, mq_tab_page_get_title(page));
}
@@ -243,3 +246,12 @@ mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri,
return node->page;
}
+
+void
+mq_notebook_update_tab_title(MqNotebook *notebook, MqTabPage *tab_page,
+ const gchar *title)
+{
+ if (tab_page == notebook->current_page) {
+ mq_window_set_title(notebook->window, title);
+ }
+}