popupSwitchMenuItem: Emit correct switch state with toggled signal

The toggled signal was incorrectly emitting the pspec instead of the switch state.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3493>
This commit is contained in:
Andrew Zaech 2024-09-29 22:43:15 +00:00
parent dde13b30c7
commit 7fe05f6bc9

View File

@ -607,8 +607,8 @@ export const PopupSwitchMenuItem = GObject.registerClass({
this.checkAccessibleState(); this.checkAccessibleState();
} }
_onToggled(sw, state) { _onToggled() {
this.emit('toggled', state); this.emit('toggled', this._switch.state);
this.checkAccessibleState(); this.checkAccessibleState();
} }