From 5716f1f5c99fa22a09c6d11962aab2e971b1b837 Mon Sep 17 00:00:00 2001 From: Stuart Hayhurst Date: Mon, 12 Feb 2024 16:50:59 +0000 Subject: [PATCH] Experiment --- extension/extension.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/extension.js b/extension/extension.js index 0516e9d..c1784cf 100644 --- a/extension/extension.js +++ b/extension/extension.js @@ -146,7 +146,7 @@ const PrivacyQuickGroup = GObject.registerClass( this.connect('clicked', () => { if (clickToToggle) { //Enable / disable every setting according to its bind flag - let targetState = !this.checked; + let targetState = this.checked; this._settingsInfo.forEach((settingInfo) => { let newState = targetState ^ (settingInfo[2] == Gio.SettingsBindFlags.INVERT_BOOLEAN); settingInfo[0].set_boolean(settingInfo[1], newState); @@ -209,12 +209,12 @@ const PrivacyQuickGroup = GObject.registerClass( } _updateVisualState() { - //If any of the privacy settings are enabled, set enableToggle - let enableToggle = false; + //If all of the privacy settings are disabled, set enableToggle to true + let enableToggle = true; this._settingsInfo.forEach((settingInfo) => { let settingEnabled = settingInfo[0].get_boolean(settingInfo[1]); if (settingEnabled == (settingInfo[2] != Gio.SettingsBindFlags.INVERT_BOOLEAN)) { - enableToggle = true; + enableToggle = false; } });