diff options
-rw-r--r-- | src/tab-page.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/tab-page.c b/src/tab-page.c index 27c6ae9..3ffdfe7 100644 --- a/src/tab-page.c +++ b/src/tab-page.c @@ -149,12 +149,7 @@ static void init_root(MqTabPage *tab_page) { tab_page->root = tab_page; - tab_page->parent = NULL; - tab_page->prev = NULL; - tab_page->next = NULL; - tab_page->first_child = tab_page->last_child = NULL; tab_page->position = 0; - tab_page->tree_size = 1; } static void @@ -163,13 +158,6 @@ init_non_root(MqTabPage *tab_page) GtkWidget *navigation_toolbar; GtkWidget *find_toolbar; - tab_page->parent = NULL; - tab_page->prev = NULL; - tab_page->next = NULL; - tab_page->first_child = tab_page->last_child = NULL; - tab_page->tree_size = 1; - tab_page->title = "New tab"; - tab_page->window = tab_page->source->window; tab_page->application = mq_window_get_application(tab_page->window); @@ -215,12 +203,12 @@ constructed(GObject *object) init_root(tab_page); break; case CREATE_SIBLING: - init_non_root(tab_page); append_sibling(tab_page); + init_non_root(tab_page); break; case CREATE_CHILD: - init_non_root(tab_page); append_child(tab_page); + init_non_root(tab_page); break; case CREATE_NONE: case N_CREATE_TYPES: @@ -326,8 +314,14 @@ mq_tab_page_class_init(MqTabPageClass *klass) } static void -mq_tab_page_init(MqTabPage G_GNUC_UNUSED *tab_page) +mq_tab_page_init(MqTabPage *tab_page) { + tab_page->parent = NULL; + tab_page->prev = NULL; + tab_page->next = NULL; + tab_page->first_child = tab_page->last_child = NULL; + tab_page->tree_size = 1; + tab_page->title = "New tab"; } MqTabPage * |