From c01c1090ab0f6339b9ee92168720e461552a0975 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 28 Sep 2017 15:38:19 -0400 Subject: MqTab: Create model before tree --- (limited to 'src/tab.c') diff --git a/src/tab.c b/src/tab.c index ff22eae..5914bdf 100644 --- a/src/tab.c +++ b/src/tab.c @@ -176,11 +176,9 @@ create_tab_list(MqTab *tab) GtkCellRenderer *cell_renderer; GtkWidget *scrolled_window; - tree_view = gtk_tree_view_new(); + tree_view = gtk_tree_view_new_with_model(create_tree_model(tab)); tree_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); gtk_tree_selection_set_mode(tree_selection, GTK_SELECTION_BROWSE); - gtk_tree_view_set_model(GTK_TREE_VIEW(tree_view), - create_tree_model(tab)); gtk_tree_selection_select_path(tree_selection, gtk_tree_path_new_from_indices( mq_window_get_current_tab(tab->window) - 1, -1)); -- cgit v0.9.1