summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-25 00:13:14 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-25 00:15:38 (EDT)
commitfbe55170aa976884537b72a243c1d697632ee416 (patch)
tree58893798f5f0bd0c2664fbbd120d3dca7242136b /src
parent9247ac5315621731adb2433d0ad002f426659e8b (diff)
downloadmarquee-fbe55170aa976884537b72a243c1d697632ee416.zip
marquee-fbe55170aa976884537b72a243c1d697632ee416.tar.gz
marquee-fbe55170aa976884537b72a243c1d697632ee416.tar.bz2
mq_window_insert_tab(): New function
Diffstat (limited to 'src')
-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