From c3c52143324ff347dd9b0b989e6602543f519ea8 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 18 Oct 2017 04:14:03 -0400 Subject: MqTabPage: Instantiate MqTabLabel before adding to notebook Otherwise, mq_tab_page_update_positions() is called before there is an MqTabLabel on which to set a position. --- diff --git a/src/tab-page.c b/src/tab-page.c index 3ffdfe7..34a5d77 100644 --- a/src/tab-page.c +++ b/src/tab-page.c @@ -182,9 +182,6 @@ init_non_root(MqTabPage *tab_page) find_toolbar, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(tab_page), GTK_WIDGET(tab_page->web_view), TRUE, TRUE, 0); - - mq_window_insert_tab(tab_page->window, - GTK_WIDGET(tab_page), tab_page->label, tab_page->position); } static void @@ -203,12 +200,18 @@ constructed(GObject *object) init_root(tab_page); break; case CREATE_SIBLING: - append_sibling(tab_page); init_non_root(tab_page); + append_sibling(tab_page); + mq_window_insert_tab(tab_page->window, + GTK_WIDGET(tab_page), tab_page->label, + tab_page->position); break; case CREATE_CHILD: - append_child(tab_page); init_non_root(tab_page); + append_child(tab_page); + mq_window_insert_tab(tab_page->window, + GTK_WIDGET(tab_page), tab_page->label, + tab_page->position); break; case CREATE_NONE: case N_CREATE_TYPES: -- cgit v0.9.1