summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-23 15:13:14 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-23 15:13:14 (EDT)
commit5a93aca93a6ad44451a894dd1d514ed8957d9eb5 (patch)
tree0d9c2a57220e3a52b26a2b889569ccbe30747101
parentc8eb35b163522363c4c780d38d9cf4b402477a7a (diff)
downloadmarquee-5a93aca93a6ad44451a894dd1d514ed8957d9eb5.zip
marquee-5a93aca93a6ad44451a894dd1d514ed8957d9eb5.tar.gz
marquee-5a93aca93a6ad44451a894dd1d514ed8957d9eb5.tar.bz2
mq_notebook_set_current_page(): New function
-rw-r--r--src/notebook.c10
-rw-r--r--src/notebook.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c
index 5a43988..48957c9 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -289,6 +289,16 @@ mq_notebook_get_n_pages(MqNotebook *notebook)
}
void
+mq_notebook_set_current_page(MqNotebook *notebook, gint page_num)
+{
+ MqTabTree *node;
+
+ node = MQ_TAB_TREE(mq_tree_seek(MQ_TREE(notebook->tree), page_num));
+ notebook->current_page = node->page;
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), page_num);
+}
+
+void
mq_notebook_update_tab_title(MqNotebook *notebook, MqTabPage *tab_page,
const gchar *title)
{
diff --git a/src/notebook.h b/src/notebook.h
index 5d00074..43199f9 100644
--- a/src/notebook.h
+++ b/src/notebook.h
@@ -68,6 +68,9 @@ gint
mq_notebook_get_n_pages(MqNotebook *notebook);
void
+mq_notebook_set_current_page(MqNotebook *notebook, gint page_num);
+
+void
mq_notebook_update_tab_title(MqNotebook *notebook, MqTabPage *tab_page,
const gchar *title);