From 711964ab6cf30a4db8d93afd1e7976b10a7aa48a Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 23 Oct 2017 05:25:34 -0400 Subject: mq_notebook_insert_*(): Return tab page --- 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); -- cgit v0.9.1