summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-09-02 17:10:50 +0000
committerAylur <[email protected]>2024-09-02 17:10:50 +0000
commitf5d5376ff90b7fef5016fef23d832c9929399785 (patch)
tree08d6cd62cb664d06d173a98e99a91f30eab68256
parent8071a20035fb1119edef877f29b02893dbef76dd (diff)
rename: box implicit_destroy to no_implicit_destroy
-rw-r--r--core/src/widget/box.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/widget/box.vala b/core/src/widget/box.vala
index 39dee92..6bd1bcb 100644
--- a/core/src/widget/box.vala
+++ b/core/src/widget/box.vala
@@ -9,7 +9,7 @@ public class Box : Gtk.Box {
/**
* wether to implicity destroy previous children when setting them
*/
- public bool implicit_destroy { get; set; default = true; }
+ public bool no_implicit_destroy { get; set; default = false; }
public List<weak Gtk.Widget> children {
set { _set_children(value); }
@@ -42,10 +42,10 @@ public class Box : Gtk.Box {
private void _set_children(List<weak Gtk.Widget> arr) {
foreach(var child in get_children()) {
- if (implicit_destroy && arr.find(child).length() == 0)
- child.destroy();
- else
+ if (no_implicit_destroy)
remove(child);
+ else if (arr.find(child).length() == 0)
+ child.destroy();
}
foreach(var child in arr)