diff options
author | Aylur <[email protected]> | 2024-10-09 03:08:51 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-10-09 03:08:51 +0000 |
commit | d6cbbdfb3f6e81c8265af36c88fd9547d93f9cbd (patch) | |
tree | a4f018b52cde3e4b10967f22d05861c4d4b9c73d /core/src/widget/box.vala | |
parent | 2fa83eb09047e603835c462ff0d8a04eba016807 (diff) |
core: implement generic no_implicit_destroy prop
Diffstat (limited to 'core/src/widget/box.vala')
-rw-r--r-- | core/src/widget/box.vala | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/core/src/widget/box.vala b/core/src/widget/box.vala index 0008fd4..943c821 100644 --- a/core/src/widget/box.vala +++ b/core/src/widget/box.vala @@ -6,11 +6,6 @@ public class Box : Gtk.Box { set { orientation = value ? Gtk.Orientation.VERTICAL : Gtk.Orientation.HORIZONTAL; } } - /** - * whether to implicity destroy previous children when setting them - */ - public bool no_implicit_destroy { get; set; default = false; } - public List<weak Gtk.Widget> children { set { _set_children(value); } owned get { return get_children(); } @@ -42,11 +37,7 @@ public class Box : Gtk.Box { private void _set_children(List<weak Gtk.Widget> arr) { foreach(var child in get_children()) { - if (!no_implicit_destroy && arr.find(child).length() == 0) { - child.destroy(); - } else { - remove(child); - } + remove(child); } foreach(var child in arr) |