mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 15:21:53 +00:00
Deshabilitar la opción de espacios de trabajo para pruebas y ajustar la configuración de preferencias relacionadas
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user