diff options
author | Aylur <[email protected]> | 2024-10-15 15:30:04 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-15 15:30:04 +0200 |
commit | cbe650afb31c24faea6da45b4aeeffc6e964969d (patch) | |
tree | d5c3788835ca7e50d68cd023026e7738f39f6f71 /core/src/widget/stack.vala | |
parent | bdb23e20f171da7c769cba9e393d7e406e563a78 (diff) | |
parent | bafd48d3df9b43a1d49ec015eff30619d595468b (diff) |
Merge pull request #46 from Aylur/small-refactor
Small refactor
Diffstat (limited to 'core/src/widget/stack.vala')
-rw-r--r-- | core/src/widget/stack.vala | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/core/src/widget/stack.vala b/core/src/widget/stack.vala deleted file mode 100644 index 02f9959..0000000 --- a/core/src/widget/stack.vala +++ /dev/null @@ -1,26 +0,0 @@ -public class Astal.Stack : Gtk.Stack { - public string shown { - get { return visible_child_name; } - set { visible_child_name = value; } - } - - public List<weak Gtk.Widget> children { - set { _set_children(value); } - owned get { return get_children(); } - } - - private void _set_children(List<weak Gtk.Widget> arr) { - foreach(var child in get_children()) { - remove(child); - } - - var i = 0; - foreach(var child in arr) { - if (child.name != null) { - add_named(child, child.name); - } else { - add_named(child, (++i).to_string()); - } - } - } -} |