summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/notebook.c15
-rw-r--r--src/notebook.h3
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);