summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-23 06:17:27 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-23 06:18:01 (EDT)
commit7778c11d8c753e7f1db7ab4402c6fbb8b5635545 (patch)
tree802db091e2298ca711b61959d38dd9cb6b2ef5ac
parentccaf66f3506ecc4cbdf02bcf44454727c78b16a7 (diff)
downloadmarquee-7778c11d8c753e7f1db7ab4402c6fbb8b5635545.zip
marquee-7778c11d8c753e7f1db7ab4402c6fbb8b5635545.tar.gz
marquee-7778c11d8c753e7f1db7ab4402c6fbb8b5635545.tar.bz2
mq_notebook_get_n_pages(): New function
-rw-r--r--src/notebook.c6
-rw-r--r--src/notebook.h3
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);