diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-16 22:48:31 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-16 22:48:31 (EDT) |
commit | 0c35f8f8792a81c43602b8759b20dfd6e4c2ee52 (patch) | |
tree | 3be60ab4f77a3aa9c81bccad98ca2380dc5ec79c /src | |
parent | 16f8a711d0fc4e3727141fd515fbef844e96e29a (diff) | |
download | marquee-0c35f8f8792a81c43602b8759b20dfd6e4c2ee52.zip marquee-0c35f8f8792a81c43602b8759b20dfd6e4c2ee52.tar.gz marquee-0c35f8f8792a81c43602b8759b20dfd6e4c2ee52.tar.bz2 |
add_tab(): Make tabs reorderable and detachable
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index d8d3342..c9d67d9 100644 --- a/src/window.c +++ b/src/window.c @@ -29,12 +29,18 @@ static void add_tab(MqWindow *window, gchar *uri, gint position) { - MqTab *tab; + MqTab *tab; + GtkWidget *tab_widget; tab = mq_tab_new(uri); /* TODO: Set tab label (container widget with icon and title) */ + tab_widget = mq_tab_get_container(tab); position = gtk_notebook_insert_page(GTK_NOTEBOOK(window->notebook), - mq_tab_get_container(tab), NULL, position); + tab_widget, NULL, position); + gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(window->notebook), + tab_widget, TRUE); + gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(window->notebook), + tab_widget, TRUE); } MqWindow * |