diff options
-rw-r--r-- | src/tab.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -144,28 +144,26 @@ tab_list_button_toggled_cb(GtkToggleButton *toggle_button, GtkWidget *tab_list) static void create_tree_model_recurse(MqTab *node, GtkTreeStore *tree_store, - GtkTreeSelection *tree_selection, GtkTreeIter *parent_tree_iter) + GtkTreeIter *parent_tree_iter) { GtkTreeIter tree_iter; for (; node; node = node->next) { gtk_tree_store_append(tree_store, &tree_iter, parent_tree_iter); gtk_tree_store_set(tree_store, &tree_iter, 0, node->title, -1); - gtk_tree_selection_select_iter(tree_selection, &tree_iter); create_tree_model_recurse(node->first_child, tree_store, - tree_selection, &tree_iter); + &tree_iter); } } static GtkTreeModel * -create_tree_model(MqTab *tab, GtkTreeSelection *tree_selection) +create_tree_model(MqTab *tab) { GtkTreeStore *tree_store; tree_store = gtk_tree_store_new(1, G_TYPE_STRING); - create_tree_model_recurse(tab->root->first_child, tree_store, - tree_selection, NULL); + create_tree_model_recurse(tab->root->first_child, tree_store, NULL); return GTK_TREE_MODEL(tree_store); } @@ -182,7 +180,7 @@ create_tab_list(MqTab *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, tree_selection)); + create_tree_model(tab)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), FALSE); gtk_tree_view_set_activate_on_single_click(GTK_TREE_VIEW(tree_view), TRUE); |