mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-21 04:10:44 +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:
@@ -190,7 +190,7 @@ pref('zen.splitView.rearrange-hover-size', 24);
|
||||
pref('zen.startup.smooth-scroll-in-tabs', true);
|
||||
|
||||
// Zen Workspaces
|
||||
pref('zen.workspaces.enabled', true, locked);
|
||||
pref('zen.workspaces.disabled_for_testing', false);
|
||||
pref('zen.workspaces.hide-deactivated-workspaces', false);
|
||||
pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.individual-pinned-tabs', true);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -17,27 +17,21 @@
|
||||
<label><html:h2 data-l10n-id="zen-settings-workspaces-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-settings-workspaces-description" />
|
||||
|
||||
<checkbox id="zenWorkspacesActivate"
|
||||
data-l10n-id="zen-settings-workspaces-enabled"
|
||||
preference="zen.workspaces.enabled"/>
|
||||
<vbox class="indent">
|
||||
<checkbox id="zenWorkspacesHideDefaultContainer"
|
||||
data-l10n-id="zen-settings-workspaces-hide-default-container-indicator"
|
||||
preference="zen.workspaces.hide-default-container-indicator"/>
|
||||
<checkbox id="zenWorkspacesAllowPinnedTabsForDifferentWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-allow-pinned-tabs-for-different-workspaces"
|
||||
preference="zen.workspaces.individual-pinned-tabs"/>
|
||||
<checkbox id="zenWorkspacesDisplayAsIconStrip"
|
||||
data-l10n-id="zen-settings-workspaces-display-as-icon-strip"
|
||||
preference="zen.workspaces.show-icon-strip"/>
|
||||
<checkbox id="zenWorkspacesForceContainerTabsToWorkspace"
|
||||
data-l10n-id="zen-settings-workspaces-force-container-tabs-to-workspace"
|
||||
preference="zen.workspaces.force-container-workspace"/>
|
||||
<checkbox id="zenWorkspaceHideDeactivatedWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-hide-deactivated-workspaces"
|
||||
preference="zen.workspaces.hide-deactivated-workspaces"/>
|
||||
|
||||
</vbox>
|
||||
<checkbox id="zenWorkspacesHideDefaultContainer"
|
||||
data-l10n-id="zen-settings-workspaces-hide-default-container-indicator"
|
||||
preference="zen.workspaces.hide-default-container-indicator"/>
|
||||
<checkbox id="zenWorkspacesAllowPinnedTabsForDifferentWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-allow-pinned-tabs-for-different-workspaces"
|
||||
preference="zen.workspaces.individual-pinned-tabs"/>
|
||||
<checkbox id="zenWorkspacesDisplayAsIconStrip"
|
||||
data-l10n-id="zen-settings-workspaces-display-as-icon-strip"
|
||||
preference="zen.workspaces.show-icon-strip"/>
|
||||
<checkbox id="zenWorkspacesForceContainerTabsToWorkspace"
|
||||
data-l10n-id="zen-settings-workspaces-force-container-tabs-to-workspace"
|
||||
preference="zen.workspaces.force-container-workspace"/>
|
||||
<checkbox id="zenWorkspaceHideDeactivatedWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-hide-deactivated-workspaces"
|
||||
preference="zen.workspaces.hide-deactivated-workspaces"/>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenTabsUnloadCategory"
|
||||
|
||||
@@ -9,7 +9,7 @@ index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be1705
|
||||
+
|
||||
+// zen:
|
||||
+// Disable some of zen's features to better match the default Firefox experience
|
||||
+user_pref("zen.workspaces.enabled", false);
|
||||
+user_pref("zen.workspaces.disabled_for_testing", true);
|
||||
+user_pref("zen.welcome-screen.enabled", false);
|
||||
+user_pref("zen.tab-unloader.enabled", false);
|
||||
+user_pref("zen.watermark.enabled", false);
|
||||
|
||||
Reference in New Issue
Block a user