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

@@ -479,7 +479,7 @@
}
}
@media (not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator')) or (not (-moz-bool-pref: 'zen.workspaces.enabled')) {
@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') {
#zen-current-workspace-indicator {
display: none !important;
}

View File

@@ -309,7 +309,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
get workspaceEnabled() {
if (typeof this._workspaceEnabled === 'undefined') {
this._workspaceEnabled = Services.prefs.getBoolPref('zen.workspaces.enabled', false) && this.shouldHaveWorkspaces;
this._workspaceEnabled = (!Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false)) && this.shouldHaveWorkspaces;
return this._workspaceEnabled;
}
return this._workspaceEnabled;
@@ -368,21 +368,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
return this._workspaceCache;
}
async onWorkspacesEnabledChanged() {
if (this.workspaceEnabled) {
throw Error("Shoud've had reloaded the window");
} else {
this._workspaceCache = null;
document.getElementById('zen-workspaces-button')?.remove();
for (let tab of gBrowser.tabs) {
gBrowser.showTab(tab);
}
}
}
async initializeWorkspaces() {
Services.prefs.addObserver('zen.workspaces.enabled', this.onWorkspacesEnabledChanged.bind(this));
await this.initializeWorkspacesButton();
if (this.workspaceEnabled) {
this._initializeWorkspaceCreationIcons();