summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-28 15:38:19 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-28 15:38:19 (EDT)
commitc01c1090ab0f6339b9ee92168720e461552a0975 (patch)
tree10014ea4b9b9f162e593c049bb2362b5a92aed54 /src
parent3851962ad7c5e8f7e346b3beeb3ec5f508e4a026 (diff)
downloadmarquee-c01c1090ab0f6339b9ee92168720e461552a0975.zip
marquee-c01c1090ab0f6339b9ee92168720e461552a0975.tar.gz
marquee-c01c1090ab0f6339b9ee92168720e461552a0975.tar.bz2
MqTab: Create model before tree
Diffstat (limited to 'src')
-rw-r--r--src/tab.c4
1 files changed, 1 insertions, 3 deletions
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));