timeLimitsManager: Simple split of enabled setting in two

As described and motivated in
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306, it
turns out that we want to be able to save screen time usage data while
not enabling limits based on that usage.

Bump the shell’s dependency on gsettings-desktop-schemas to get the
split setting, and roughly adapt the existing `timeLimitsManager` code
to use the new setting names. The code currently treats the two settings
as equivalent / expects them both to be set the same. The following
commits will refine that behaviour.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610>
This commit is contained in:
Philip Withnall
2025-01-23 17:23:23 +00:00
committed by Marge Bot
parent 17ce108a35
commit 73565e582c
4 changed files with 33 additions and 20 deletions

View File

@ -168,7 +168,7 @@ export const TimeLimitsManager = GObject.registerClass({
}
_updateSettings() {
if (!this._screenTimeLimitSettings.get_boolean('enabled')) {
if (!this._screenTimeLimitSettings.get_boolean('history-enabled')) {
if (this._state !== TimeLimitsState.DISABLED) {
this._stopStateMachine().catch(
e => console.warn(`Failed to stop state machine: ${e.message}`));