From dc37d3c4a78af228a6a51b7248cadef9e01b3b27 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 28 Sep 2017 15:33:23 -0400 Subject: Revert "MqTab: Attempt to select rows" This reverts commit 9f369078c00653b68af2635e1ba53fc323036767. --- diff --git a/src/tab.c b/src/tab.c index b0f1adf..47daeba 100644 --- a/src/tab.c +++ b/src/tab.c @@ -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); -- cgit v0.9.1