1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 20:39:59 +02:00

chore: Made container specific essentials the default, b=no-bug, c=workspaces, common, tests

This commit is contained in:
Mr. M 2025-06-26 20:49:55 +02:00
parent f0169277a0
commit 69f60b7066
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
8 changed files with 14 additions and 13 deletions

View file

@ -11,7 +11,7 @@ pref('zen.workspaces.wrap-around-navigation', true);
pref('zen.workspaces.natural-scroll', false); pref('zen.workspaces.natural-scroll', false);
pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key
pref('services.sync.engine.workspaces', false); pref('services.sync.engine.workspaces', false);
pref('zen.workspaces.container-specific-essentials-enabled', false); pref('zen.workspaces.separate-essentials', true);
#ifdef MOZILLA_OFFICIAL #ifdef MOZILLA_OFFICIAL
pref('zen.workspaces.debug', false); pref('zen.workspaces.debug', false);

View file

@ -742,19 +742,13 @@ var gZenWorkspacesSettings = {
}; };
Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); 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.enabled', tabsUnloaderPrefListener); // We can use the same listener for both prefs
Services.prefs.addObserver( Services.prefs.addObserver('zen.workspaces.separate-essentials', tabsUnloaderPrefListener);
'zen.workspaces.container-specific-essentials-enabled',
tabsUnloaderPrefListener
);
Services.prefs.addObserver('zen.glance.activation-method', tabsUnloaderPrefListener); Services.prefs.addObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
window.addEventListener('unload', () => { window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.enabled', tabsUnloaderPrefListener); Services.prefs.removeObserver('zen.glance.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.activation-method', tabsUnloaderPrefListener); Services.prefs.removeObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
Services.prefs.removeObserver( Services.prefs.removeObserver('zen.workspaces.separate-essentials', tabsUnloaderPrefListener);
'zen.workspaces.container-specific-essentials-enabled',
tabsUnloaderPrefListener
);
}); });
}, },
}; };
@ -1153,7 +1147,7 @@ Preferences.addAll([
default: true, default: true,
}, },
{ {
id: 'zen.workspaces.container-specific-essentials-enabled', id: 'zen.workspaces.separate-essentials',
type: 'bool', type: 'bool',
default: false, default: false,
}, },

View file

@ -47,7 +47,7 @@
preference="zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url"/> preference="zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url"/>
<checkbox id="zenPinnedTabContainerSpecificEssentials" <checkbox id="zenPinnedTabContainerSpecificEssentials"
data-l10n-id="zen-pinned-tab-manager-container-specific-essentials-enabled" data-l10n-id="zen-pinned-tab-manager-container-specific-essentials-enabled"
preference="zen.workspaces.container-specific-essentials-enabled"/> preference="zen.workspaces.separate-essentials"/>
<hbox align="center"> <hbox align="center">
<label id="zenPinnedTabCloseShortcutBehaviorLabel" data-l10n-id="zen-pinned-tab-manager-close-shortcut-behavior-label"/> <label id="zenPinnedTabCloseShortcutBehaviorLabel" data-l10n-id="zen-pinned-tab-manager-close-shortcut-behavior-label"/>

View file

@ -51,6 +51,10 @@ class nsZenUIMigration {
if (userChromeFile.exists() || userContentFile.exists()) { if (userChromeFile.exists() || userContentFile.exists()) {
Services.prefs.setBoolPref('toolkit.legacyUserProfileCustomizations.stylesheets', true); Services.prefs.setBoolPref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
} }
Services.prefs.setBoolPref(
'zen.workspaces.separate-essentials',
Services.prefs.getBoolPref('zen.workspaces.container-specific-essentials-enabled', false)
);
} }
} }

View file

@ -1,5 +1,5 @@
[DEFAULT] [DEFAULT]
prefs = ["zen.workspaces.container-specific-essentials-enabled=true"] prefs = ["zen.workspaces.separate-essentials=true"]
["browser_container_auto_switch.js"] ["browser_container_auto_switch.js"]
["browser_container_specific_essentials.js"] ["browser_container_specific_essentials.js"]

View file

@ -1,3 +1,5 @@
[DEFAULT]
prefs = ["zen.workspaces.separate-essentials=false"]
["browser_pinned_unload_changed.js"] ["browser_pinned_unload_changed.js"]
["browser_pinned_unload_noreset.js"] ["browser_pinned_unload_noreset.js"]

View file

@ -1,4 +1,5 @@
[DEFAULT] [DEFAULT]
prefs = ["zen.workspaces.separate-essentials=false"]
support-files = [ support-files = [
"head.js", "head.js",
] ]

View file

@ -100,7 +100,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
false false
); );
this.containerSpecificEssentials = Services.prefs.getBoolPref( this.containerSpecificEssentials = Services.prefs.getBoolPref(
'zen.workspaces.container-specific-essentials-enabled', 'zen.workspaces.separate-essentials',
false false
); );
ChromeUtils.defineLazyGetter(this, 'tabContainer', () => ChromeUtils.defineLazyGetter(this, 'tabContainer', () =>