diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/widget/box.vala | 11 | ||||
-rw-r--r-- | core/src/widget/button.vala | 10 | ||||
-rw-r--r-- | core/src/widget/stack.vala | 11 |
3 files changed, 7 insertions, 25 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) diff --git a/core/src/widget/button.vala b/core/src/widget/button.vala index 4d1f467..ad60da1 100644 --- a/core/src/widget/button.vala +++ b/core/src/widget/button.vala @@ -33,11 +33,11 @@ public class Button : Gtk.Button { } public enum MouseButton { - PRIMARY, - MIDDLE, - SECONDARY, - BACK, - FORWARD, + PRIMARY = 1, + MIDDLE = 2, + SECONDARY = 3, + BACK = 4, + FORWARD = 5, } // these structs are here because gjs converts every event diff --git a/core/src/widget/stack.vala b/core/src/widget/stack.vala index 00adf7f..02f9959 100644 --- a/core/src/widget/stack.vala +++ b/core/src/widget/stack.vala @@ -1,9 +1,4 @@ public class Astal.Stack : Gtk.Stack { - /** - * whether to implicity destroy previous children when setting them - */ - public bool no_implicit_destroy { get; set; default = false; } - public string shown { get { return visible_child_name; } set { visible_child_name = value; } @@ -16,11 +11,7 @@ public class Astal.Stack : Gtk.Stack { 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); } var i = 0; |