diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-07-26 10:53:55 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-07-26 18:02:44 -0400 |
commit | 1e8be8702693ae24d58e32de848171a9f4c762a2 (patch) | |
tree | 808f0eb3638ca6a5320f99def9b2b6034fd2d262 /demos/constraint-editor | |
parent | ef6babf896cd06bd42d0fb11e3aae7c109708bdd (diff) | |
download | gtk+-1e8be8702693ae24d58e32de848171a9f4c762a2.tar.gz |
flattenlistmodel: Make the constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
Diffstat (limited to 'demos/constraint-editor')
-rw-r--r-- | demos/constraint-editor/constraint-view.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/demos/constraint-editor/constraint-view.c b/demos/constraint-editor/constraint-view.c index c9d08acab8..a3fbd447bf 100644 --- a/demos/constraint-editor/constraint-view.c +++ b/demos/constraint-editor/constraint-view.c @@ -174,28 +174,29 @@ constraint_view_init (ConstraintView *self) manager = gtk_constraint_layout_new (); gtk_widget_set_layout_manager (GTK_WIDGET (self), manager); - all_children = gtk_widget_observe_children (GTK_WIDGET (self)); - all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager)); guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager)); + + all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager)); filter = gtk_custom_filter_new (omit_internal, NULL, NULL); constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter); g_object_unref (filter); + g_object_unref (all_constraints); + + all_children = gtk_widget_observe_children (GTK_WIDGET (self)); filter = gtk_custom_filter_new (omit_internal, NULL, NULL); children = (GListModel *)gtk_filter_list_model_new (all_children, filter); g_object_unref (filter); + g_object_unref (all_children); list = g_list_store_new (G_TYPE_LIST_MODEL); g_list_store_append (list, children); g_list_store_append (list, guides); g_list_store_append (list, constraints); - self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list))); g_object_unref (children); g_object_unref (guides); g_object_unref (constraints); - g_object_unref (all_children); - g_object_unref (all_constraints); - g_object_unref (list); + self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list))); controller = (GtkEventController *)gtk_gesture_drag_new (); g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self); |