diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-07-26 16:38:53 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-07-26 16:38:53 -0400 |
commit | 16b043a1279e1cf3fa3070ccc018b40bc28baf58 (patch) | |
tree | 200eb9d6043ac25804d5da0d392ecda85984696b /tests/testlistview.c | |
parent | 0b7f7028d918e7efb90fc986146d4945e2419d46 (diff) | |
download | gtk+-tree-list-constructor.tar.gz |
treelistmodel: Make constructor transfer fulltree-list-constructor
Make gtk_tree_list_model_new() take the root model
as first argument, and make it transfer full, for
consistency with other wrapping list constructors.
Update all callers.
Still missing here: Make the model property writable,
and allow passing NULL in the constructor.
Diffstat (limited to 'tests/testlistview.c')
-rw-r--r-- | tests/testlistview.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/testlistview.c b/tests/testlistview.c index 6eea54d593..c0552d14af 100644 --- a/tests/testlistview.c +++ b/tests/testlistview.c @@ -589,7 +589,6 @@ int main (int argc, char *argv[]) { GtkWidget *win, *vbox, *sw, *listview, *search_entry, *statusbar; - GListModel *dirmodel; GtkTreeListModel *tree; GtkFilterListModel *filter; GtkFilter *custom_filter; @@ -623,13 +622,11 @@ main (int argc, char *argv[]) root = g_file_new_for_commandline_arg (argv[1]); else root = g_file_new_for_path (g_get_current_dir ()); - dirmodel = create_list_model_for_directory (root); - tree = gtk_tree_list_model_new (FALSE, - dirmodel, + tree = gtk_tree_list_model_new (create_list_model_for_directory (root), + FALSE, TRUE, create_list_model_for_file_info, NULL, NULL); - g_object_unref (dirmodel); g_object_unref (root); custom_filter = gtk_custom_filter_new (match_file, search_entry, NULL); |