rename: box implicit_destroy to no_implicit_destroy

This commit is contained in:
Aylur
2024-09-02 17:10:50 +00:00
parent 8071a20035
commit f5d5376ff9
+4 -4
View File
@@ -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)