[gnome-clocks] window: Don't call Gtk.Stack.child_set_property()
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] window: Don't call Gtk.Stack.child_set_property()
- Date: Fri, 7 Jan 2022 17:23:43 +0000 (UTC)
commit fdcadc0a5214796aa115bf183c4163f77e2ee6d7
Author: Yetizone <andreii lisita gmail com>
Date: Tue Jan 12 15:52:56 2021 +0200
window: Don't call Gtk.Stack.child_set_property()
It's currently used to set the "needs-attention" child property for stack's children
In GTK4 "needs-attention" is a property of Gtk.StackPage
Every stack child has a Gtk.StackPage object associated with it
src/window.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index 48239eed..7bd9e4f4 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -136,7 +136,8 @@ public class Window : Adw.ApplicationWindow {
});
stopwatch.notify["state"].connect ((w) => {
- stack.child_set_property (stopwatch, "needs-attention", stopwatch.state ==
Stopwatch.Face.State.RUNNING);
+ var stopwatch_stack_page = stack.get_page (stopwatch);
+ stopwatch_stack_page.needs_attention = (stopwatch.state == Stopwatch.Face.State.RUNNING);
});
timer.ring.connect ((w) => {
@@ -146,7 +147,8 @@ public class Window : Adw.ApplicationWindow {
timer.notify["is-running"].connect ((w) => {
- stack.child_set_property (timer, "needs-attention", timer.is_running);
+ var timer_stack_page = stack.get_page (timer);
+ timer_stack_page.needs_attention = timer.is_running;
});
Gtk.StyleContext style = get_style_context ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]