Files
desktop/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch

91 lines
3.3 KiB
C++

diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 989e69245aeb1185125752db6b9c58e462d554e4..a4825653b48aa5012e58a277c862caaf0e37abab 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
AddonManagerPrivate: "resource://gre/modules/AddonManager.sys.mjs",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
CustomizableWidgets: "resource:///modules/CustomizableWidgets.sys.mjs",
+ ZenCustomizableUI: "chrome://browser/content/ZenCustomizableUI.sys.mjs",
HomePage: "resource:///modules/HomePage.sys.mjs",
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
@@ -25,7 +26,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
return Services.strings.createBundle(kUrl);
});
-const kDefaultThemeID = "default-theme@mozilla.org";
+const kDefaultThemeID = "firefox-compact-dark@mozilla.org";
const kSpecialWidgetPfx = "customizableui-special-";
@@ -323,13 +324,14 @@ var CustomizableUIInternal = {
"spring",
"urlbar-container",
"spring",
- "save-to-pocket-button",
- "downloads-button",
+// "downloads-button",
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
- "fxa-toolbar-menu-button",
+ "wrapper-sidebar-button",
lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null,
].filter(name => name);
+ lazy.ZenCustomizableUI.startup(this);
+
this.registerArea(
CustomizableUI.AREA_NAVBAR,
{
@@ -338,7 +340,7 @@ var CustomizableUIInternal = {
defaultPlacements: navbarPlacements,
verticalTabsDefaultPlacements: [
"firefox-view-button",
- "new-tab-button",
+// "new-tab-button",
"alltabs-button",
],
defaultCollapsed: false,
@@ -363,10 +365,10 @@ var CustomizableUIInternal = {
{
type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [
- "firefox-view-button",
+// "firefox-view-button",
"tabbrowser-tabs",
- "new-tab-button",
- "alltabs-button",
+// "new-tab-button",
+// "alltabs-button",
],
verticalTabsDefaultPlacements: [],
defaultCollapsed: null,
@@ -429,6 +431,7 @@ var CustomizableUIInternal = {
CustomizableUI.AREA_NAVBAR,
CustomizableUI.AREA_BOOKMARKS,
CustomizableUI.AREA_TABSTRIP,
+ "zen-sidebar-top-buttons",
]);
if (AppConstants.platform != "macosx") {
toolbars.add(CustomizableUI.AREA_MENUBAR);
@@ -1144,6 +1147,9 @@ var CustomizableUIInternal = {
placements = gPlacements.get(area);
}
+ // remove "zen-sidebar-top-buttons" from the placements
+ placements = placements.filter(p => p != "zen-sidebar-top-buttons");
+
// For toolbars that need it, mark as dirty.
let defaultPlacements = areaProperties.get("defaultPlacements");
if (
@@ -3521,6 +3527,9 @@ var CustomizableUIInternal = {
gSeenWidgets.add(widgetId);
}
}
+
+
+
if (gSeenWidgets.size || gNewElementCount) {
gDirty = true;
this.saveState();