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 /gtk/gtktreelistmodel.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 'gtk/gtktreelistmodel.c')
-rw-r--r-- | gtk/gtktreelistmodel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c index 4311acb9d3..82b6bf5056 100644 --- a/gtk/gtktreelistmodel.c +++ b/gtk/gtktreelistmodel.c @@ -734,8 +734,8 @@ gtk_tree_list_model_init (GtkTreeListModel *self) /** * gtk_tree_list_model_new: + * @root: (transfer full): The #GListModel to use as root * @passthrough: %TRUE to pass through items from the models - * @root: The #GListModel to use as root * @autoexpand: %TRUE to set the autoexpand property and expand the @root model * @create_func: Function to call to create the #GListModel for the children * of an item @@ -743,12 +743,12 @@ gtk_tree_list_model_init (GtkTreeListModel *self) * @user_destroy: Function to call to free @user_data * * Creates a new empty #GtkTreeListModel displaying @root with all rows collapsed. - * - * Returns: a newly created #GtkTreeListModel. + * + * Returns: a newly created #GtkTreeListModel. **/ GtkTreeListModel * -gtk_tree_list_model_new (gboolean passthrough, - GListModel *root, +gtk_tree_list_model_new (GListModel *root, + gboolean passthrough, gboolean autoexpand, GtkTreeListModelCreateModelFunc create_func, gpointer user_data, @@ -768,7 +768,7 @@ gtk_tree_list_model_new (gboolean passthrough, self->user_data = user_data; self->user_destroy = user_destroy; - gtk_tree_list_model_init_node (self, &self->root_node, g_object_ref (root)); + gtk_tree_list_model_init_node (self, &self->root_node, root); return self; } |