Skip to content
Snippets Groups Projects
Commit 5ea00f00 authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Use GObject bind thing

parent 4c110104
No related branches found
No related tags found
No related merge requests found
......@@ -20,16 +20,12 @@ class ApplicationWindow(Gtk.ApplicationWindow):
set_time_popover = TimePopover()
self._set_time_button.props.popover = set_time_popover
set_time_popover.connect(
'notify::datetime', self._on_set_time_popover_notify_datetime
)
self._clock = DigitalClock()
self._main_box.add(self._clock)
self._count = CountdownLabel()
self._main_box.add(self._count)
def _on_set_time_popover_notify_datetime(
self, popover: GObject.Object, pspec: GObject.ParamSpec
) -> None:
self._count.target = popover.props.datetime
set_time_popover.bind_property(
'datetime', self._count, 'target', GObject.BindingFlags.DEFAULT
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment