diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/notebook.c | 6 | ||||
-rw-r--r-- | src/notebook.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c index 1a33a4c..f5572b6 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -247,6 +247,12 @@ mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri, return node->page; } +gint +mq_notebook_get_n_pages(MqNotebook *notebook) +{ + return mq_tree_size(MQ_TREE(notebook->tree) - 1); +} + 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 4cb696e..5d00074 100644 --- a/src/notebook.h +++ b/src/notebook.h @@ -64,6 +64,9 @@ MqTabPage * mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri, MqTabPage *child); +gint +mq_notebook_get_n_pages(MqNotebook *notebook); + void mq_notebook_update_tab_title(MqNotebook *notebook, MqTabPage *tab_page, const gchar *title); |