summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/window.c12
-rw-r--r--src/window.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index 192a90a..1f16ed8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -100,3 +100,15 @@ mq_window_get_application(MqWindow *window)
{
return window->application;
}
+
+void
+mq_window_insert_tab(MqWindow *window, GtkWidget *tab_page,
+ GtkWidget *tab_label, gint position)
+{
+ gtk_notebook_insert_page(GTK_NOTEBOOK(window->notebook),
+ tab_page, tab_label, position - 1);
+ gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(window->notebook),
+ tab_page, TRUE);
+ gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(window->notebook),
+ tab_page, TRUE);
+}
diff --git a/src/window.h b/src/window.h
index 5ec8ee8..a5c7b3d 100644
--- a/src/window.h
+++ b/src/window.h
@@ -42,4 +42,8 @@ mq_window_new(MqApplication *application, gchar **uris);
MqApplication *
mq_window_get_application(MqWindow *window);
+void
+mq_window_insert_tab(MqWindow *window, GtkWidget *tab_page,
+ GtkWidget *tab_label, gint position);
+
#endif