diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-18 04:14:03 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-18 04:14:03 (EDT) |
commit | c3c52143324ff347dd9b0b989e6602543f519ea8 (patch) | |
tree | 4af89d9a23a57bd52ad0c8ff759fee1e8ba0a506 | |
parent | 61479a2347ba289d618602dfb14a0c1c76da614a (diff) | |
download | marquee-c3c52143324ff347dd9b0b989e6602543f519ea8.zip marquee-c3c52143324ff347dd9b0b989e6602543f519ea8.tar.gz marquee-c3c52143324ff347dd9b0b989e6602543f519ea8.tar.bz2 |
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.
-rw-r--r-- | src/tab-page.c | 13 |
1 files changed, 8 insertions, 5 deletions
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: |