calendar: Fix initial do-not-disturb state
The do-not-disturb button and the contained switch are
tied together via a bidirectional property binding.
However it still matters which objects are used as source
and target, as that will determine the initial state: Right
now the (unchecked) button is used as source, which means
that do-not-disturb is turned off on startup.
We want the state to be preserved, so swap source and target
to let the switch (that is bound to the underlying GSetting)
control the initial state.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2804
(cherry picked from commit 32bc064d10
)
This commit is contained in:
parent
db2917479a
commit
1a045bb210
@ -1166,8 +1166,8 @@ class CalendarMessageList extends St.Widget {
|
|||||||
child: this._dndSwitch,
|
child: this._dndSwitch,
|
||||||
label_actor: dndLabel,
|
label_actor: dndLabel,
|
||||||
});
|
});
|
||||||
this._dndButton.bind_property('checked',
|
this._dndSwitch.bind_property('state',
|
||||||
this._dndSwitch, 'state',
|
this._dndButton, 'checked',
|
||||||
GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.SYNC_CREATE);
|
GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.SYNC_CREATE);
|
||||||
hbox.add_child(this._dndButton);
|
hbox.add_child(this._dndButton);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user