Deshabilitar la opción de espacios de trabajo para pruebas y ajustar la configuración de preferencias relacionadas

This commit is contained in:
mr. m
2025-01-08 12:17:24 +00:00
parent 59f9b9967e
commit f7f87131cd
6 changed files with 19 additions and 58 deletions

View File

@@ -672,29 +672,15 @@ var gZenWorkspacesSettings = {
}
},
};
Services.prefs.addObserver('zen.workspaces.enabled', this);
Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
Services.prefs.addObserver('zen.glance.enabled', tabsUnloaderPrefListener); // We can use the same listener for both prefs
Services.prefs.addObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.workspaces.enabled', this);
Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
});
},
async observe(subject, topic, data) {
await this.onWorkspaceChange(Services.prefs.getBoolPref('zen.workspaces.enabled'));
},
async onWorkspaceChange(checked) {
let buttonIndex = await confirmRestartPrompt(true, 1, true, false);
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
return;
}
},
};
const ZEN_CKS_CLASS_BASE = 'zenCKSOption';
@@ -1007,11 +993,6 @@ Preferences.addAll([
type: 'bool',
default: true,
},
{
id: 'zen.workspaces.enabled',
type: 'bool',
default: true,
},
{
id: 'zen.theme.pill-button',
type: 'bool',