From fbe55170aa976884537b72a243c1d697632ee416 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 25 Sep 2017 00:13:14 -0400 Subject: mq_window_insert_tab(): New function --- 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 -- cgit v0.9.1