From 306e64998c1bf1fb997c1098ae92d6edfef31cd2 Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 23 Oct 2024 20:37:32 +0000 Subject: docs: astal3 and io comments --- lib/astal/gtk3/src/widget/stack.vala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/astal/gtk3/src/widget/stack.vala') diff --git a/lib/astal/gtk3/src/widget/stack.vala b/lib/astal/gtk3/src/widget/stack.vala index 02f9959..4e856a6 100644 --- a/lib/astal/gtk3/src/widget/stack.vala +++ b/lib/astal/gtk3/src/widget/stack.vala @@ -1,4 +1,12 @@ +/** + * Subclass of [class@Gtk.Stack] that has a children setter which + * invokes [method@Gt.Stack.add_named] with the child's [property@Gtk.Widget:name] property. + */ public class Astal.Stack : Gtk.Stack { + /** + * Same as [property@Gtk.Stack:visible-child-name]. + */ + [CCode (notify = false)] public string shown { get { return visible_child_name; } set { visible_child_name = value; } @@ -23,4 +31,10 @@ public class Astal.Stack : Gtk.Stack { } } } + + construct { + notify["visible_child_name"].connect(() => { + notify_property("shown"); + }); + } } -- cgit v1.2.3