diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-23 05:45:29 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-23 05:45:29 (EDT) |
commit | 801066d49005cba5888594b7e8e401f15b1bc11a (patch) | |
tree | 41577a5579f4391b28a0af20b97702e8bcc819cd | |
parent | 9a77d6915eed1155c634d4205b48eca610cfd910 (diff) | |
download | marquee-801066d49005cba5888594b7e8e401f15b1bc11a.zip marquee-801066d49005cba5888594b7e8e401f15b1bc11a.tar.gz marquee-801066d49005cba5888594b7e8e401f15b1bc11a.tar.bz2 |
mq_notebook_insert_top(): New function
-rw-r--r-- | src/notebook.c | 15 | ||||
-rw-r--r-- | src/notebook.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c index 88bfa3f..9eec2b8 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -179,6 +179,21 @@ insert_page(MqNotebook *notebook, MqTabTree *node, const gchar *uri) } MqTabPage * +mq_notebook_insert_top(MqNotebook *notebook, const gchar *uri) +{ + MqTabTree *node; + + node = MQ_TAB_TREE(mq_tree_insert_child_allocated( + MQ_TREE(g_new0(MqTabTree, 1)), + MQ_TREE(notebook->tree), + NULL)); + + insert_page(notebook, node, uri); + + return node->page; +} + +MqTabPage * mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri, MqTabPage *sibling) { diff --git a/src/notebook.h b/src/notebook.h index f083a88..47c1e5d 100644 --- a/src/notebook.h +++ b/src/notebook.h @@ -54,6 +54,9 @@ GtkWidget * mq_notebook_new(MqWindow *window); MqTabPage * +mq_notebook_insert_top(MqNotebook *notebook, const gchar *uri); + +MqTabPage * mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri, MqTabPage *sibling); |