mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
fixup! breakManager: Add new state machine for screen time/health breaks
This commit is contained in:
parent
b028a73388
commit
6150400050
1 changed files with 8 additions and 3 deletions
|
|
@ -669,9 +669,11 @@ class BreakDispatcher extends GObject.Object {
|
|||
this._manager = manager;
|
||||
this._previousState = BreakState.DISABLED;
|
||||
this._previousBreakType = null;
|
||||
this._manager.connect('take-break', this._onTakeBreak.bind(this));
|
||||
this._manager.connect('notify::state', this._onStateChanged.bind(this));
|
||||
this._manager.connect('notify::next-break-due-time', this._onStateChanged.bind(this));
|
||||
this._manager.connectObject(
|
||||
'take-break', this._onTakeBreak.bind(this),
|
||||
'notify::state', this._onStateChanged.bind(this),
|
||||
'notify::next-break-due-time', this._onStateChanged.bind(this),
|
||||
this);
|
||||
|
||||
this._systemActions = SystemActions.getDefault();
|
||||
|
||||
|
|
@ -701,6 +703,9 @@ class BreakDispatcher extends GObject.Object {
|
|||
|
||||
this._previousState = BreakState.DISABLED;
|
||||
this._previousBreakType = null;
|
||||
|
||||
this._manager.disconnectObject(this);
|
||||
this._manager = null;
|
||||
}
|
||||
|
||||
_maybePlayCompleteSound() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue