summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2018-05-08 23:41:01 +0200
committerDaniel Carl <danielcarl@gmx.de>2018-05-08 23:41:01 +0200
commit7127741ea6be3c17eba5844c9a41c423c6f2c43c (patch)
tree2e36abda8b1199cc08a3ebb20e9d94d6da9f0857 /src
parent8873b93903c9254ccaf45838f1a8a63b7177000f (diff)
Set tree model direct to tree view.
Diffstat (limited to 'src')
-rw-r--r--src/completion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/completion.c b/src/completion.c
index 2532f85..3b27b6c 100644
--- a/src/completion.c
+++ b/src/completion.c
@@ -96,7 +96,7 @@ gboolean completion_create(Client *c, GtkTreeModel *model,
/* prepare the tree view */
comp->win = gtk_scrolled_window_new(NULL, NULL);
- comp->tree = gtk_tree_view_new();
+ comp->tree = gtk_tree_view_new_with_model(model);
gtk_style_context_add_provider(gtk_widget_get_style_context(comp->tree),
GTK_STYLE_PROVIDER(vb.style_provider),
@@ -109,7 +109,6 @@ gboolean completion_create(Client *c, GtkTreeModel *model,
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(comp->tree), FALSE);
/* we have only on line per item so we can use the faster fixed heigh mode */
gtk_tree_view_set_fixed_height_mode(GTK_TREE_VIEW(comp->tree), TRUE);
- gtk_tree_view_set_model(GTK_TREE_VIEW(comp->tree), model);
g_object_unref(model);
/* prepare the selection */