summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-23 05:25:34 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-23 05:25:34 (EDT)
commit711964ab6cf30a4db8d93afd1e7976b10a7aa48a (patch)
treeb4d9c31c5f84fd1e18a125fe314d85e5afa1edb7
parente4c28b9ab8a06fe079234a742fcf867a947c8770 (diff)
downloadmarquee-711964ab6cf30a4db8d93afd1e7976b10a7aa48a.zip
marquee-711964ab6cf30a4db8d93afd1e7976b10a7aa48a.tar.gz
marquee-711964ab6cf30a4db8d93afd1e7976b10a7aa48a.tar.bz2
mq_notebook_insert_*(): Return tab page
-rw-r--r--src/notebook.c8
-rw-r--r--src/notebook.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/notebook.c b/src/notebook.c
index 870acf4..ffbc7b0 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -178,7 +178,7 @@ insert_page(MqNotebook *notebook, MqTabTree *node, const gchar *uri)
gtk_widget_show_all(GTK_WIDGET(node->label));
}
-void
+MqTabPage *
mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri,
MqTabPage *sibling)
{
@@ -198,9 +198,11 @@ mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri,
}
insert_page(notebook, node, uri);
+
+ return node->page;
}
-void
+MqTabPage *
mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri,
MqTabPage *child)
{
@@ -221,4 +223,6 @@ mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri,
}
insert_page(notebook, node, uri);
+
+ return node->page;
}
diff --git a/src/notebook.h b/src/notebook.h
index 970fb5a..f083a88 100644
--- a/src/notebook.h
+++ b/src/notebook.h
@@ -53,11 +53,11 @@ mq_notebook_get_type(void);
GtkWidget *
mq_notebook_new(MqWindow *window);
-void
+MqTabPage *
mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri,
MqTabPage *sibling);
-void
+MqTabPage *
mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri,
MqTabPage *child);