mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 09:26:34 +00:00
Fixed themes and profiles dialog now opens about:profiles
This commit is contained in:
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -11,6 +11,8 @@
|
|||||||
"istream": "cpp",
|
"istream": "cpp",
|
||||||
"tuple": "cpp",
|
"tuple": "cpp",
|
||||||
"utility": "cpp",
|
"utility": "cpp",
|
||||||
"variant": "cpp"
|
"variant": "cpp",
|
||||||
|
"compare": "cpp",
|
||||||
|
"thread": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
12
src/browser/base/content/browser-sets-inc.patch
Normal file
12
src/browser/base/content/browser-sets-inc.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
|
||||||
|
index 019b3cc4691520667f9bd595444e7cc752307c98..17057b24e86dce43da30bf95d1d229044704546f 100644
|
||||||
|
--- a/browser/base/content/browser-sets.inc
|
||||||
|
+++ b/browser/base/content/browser-sets.inc
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<commandset id="mainCommandSet">
|
||||||
|
+ <command id="Tools:ZenProfiles" oncommand="BrowserOpenZenProfilesMgr();"/>
|
||||||
|
<command id="cmd_newNavigator" oncommand="OpenBrowserWindow()"/>
|
||||||
|
<command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
|
||||||
|
<command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />
|
@@ -1,8 +1,16 @@
|
|||||||
diff --git a/browser/base/content/global-scripts.inc b/browser/base/content/global-scripts.inc
|
diff --git a/browser/base/content/global-scripts.inc b/browser/base/content/global-scripts.inc
|
||||||
index f5f43b8f9509c37bf217b3ed1c6c562be85430e0..c8ab55760f817aa14e3db15f6b5556118e65d218 100644
|
index f5f43b8f9509c37bf217b3ed1c6c562be85430e0..41fb7b9439a1be9c47a7f200546b0230ec6a7505 100644
|
||||||
--- a/browser/base/content/global-scripts.inc
|
--- a/browser/base/content/global-scripts.inc
|
||||||
+++ b/browser/base/content/global-scripts.inc
|
+++ b/browser/base/content/global-scripts.inc
|
||||||
@@ -22,4 +22,6 @@ if (AppConstants.platform == "macosx") {
|
@@ -12,6 +12,7 @@
|
||||||
|
# tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
+Services.scriptloader.loadSubScript("chrome://browser/content/zen-browser.js", this);
|
||||||
|
Services.scriptloader.loadSubScript("chrome://browser/content/browser.js", this);
|
||||||
|
Services.scriptloader.loadSubScript("chrome://browser/content/places/browserPlacesViews.js", this);
|
||||||
|
Services.scriptloader.loadSubScript("chrome://browser/content/browser-places.js", this);
|
||||||
|
@@ -22,4 +23,6 @@ if (AppConstants.platform == "macosx") {
|
||||||
Services.scriptloader.loadSubScript("chrome://global/content/macWindowMenu.js", this);
|
Services.scriptloader.loadSubScript("chrome://global/content/macWindowMenu.js", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ var ZenProfileDialogUI = {
|
|||||||
if (profile == ProfileService.currentProfile) {
|
if (profile == ProfileService.currentProfile) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let item = document.createElement('menu');
|
let item = document.createElement('div');
|
||||||
item.onclick = () => this._openProfile(profile);
|
item.onclick = () => this._openProfile(profile);
|
||||||
item.className = 'PanelUI-zen-profiles-item';
|
item.className = 'PanelUI-zen-profiles-item';
|
||||||
let avatar = document.createElement('img');
|
let avatar = document.createElement('img');
|
||||||
|
61
src/browser/base/content/zen-browser.js
Normal file
61
src/browser/base/content/zen-browser.js
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||||
|
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
|
function BrowserOpenZenProfilesMgr(aView, { selectTabByViewId = false } = {}) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let emWindow;
|
||||||
|
let browserWindow;
|
||||||
|
|
||||||
|
var receivePong = function (aSubject, aTopic, aData) {
|
||||||
|
let browserWin = aSubject.browsingContext.topChromeWindow;
|
||||||
|
if (!emWindow || browserWin == window /* favor the current window */) {
|
||||||
|
if (
|
||||||
|
selectTabByViewId &&
|
||||||
|
aSubject.gViewController.currentViewId !== aView
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emWindow = aSubject;
|
||||||
|
browserWindow = browserWin;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Services.obs.addObserver(receivePong, "EM-pong");
|
||||||
|
Services.obs.notifyObservers(null, "EM-ping");
|
||||||
|
Services.obs.removeObserver(receivePong, "EM-pong");
|
||||||
|
|
||||||
|
if (emWindow) {
|
||||||
|
if (aView && !selectTabByViewId) {
|
||||||
|
emWindow.loadView(aView);
|
||||||
|
}
|
||||||
|
let tab = browserWindow.gBrowser.getTabForBrowser(
|
||||||
|
emWindow.docShell.chromeEventHandler
|
||||||
|
);
|
||||||
|
browserWindow.gBrowser.selectedTab = tab;
|
||||||
|
emWindow.focus();
|
||||||
|
resolve(emWindow);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectTabByViewId) {
|
||||||
|
const target = isBlankPageURL(gBrowser.currentURI.spec)
|
||||||
|
? "current"
|
||||||
|
: "tab";
|
||||||
|
openTrustedLinkIn("about:profiles", target);
|
||||||
|
} else {
|
||||||
|
// This must be a new load, else the ping/pong would have
|
||||||
|
// found the window above.
|
||||||
|
switchToTabHavingURI("about:profiles", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
|
||||||
|
Services.obs.removeObserver(observer, aTopic);
|
||||||
|
if (aView) {
|
||||||
|
aSubject.loadView(aView);
|
||||||
|
}
|
||||||
|
aSubject.focus();
|
||||||
|
resolve(aSubject);
|
||||||
|
}, "EM-loaded");
|
||||||
|
});
|
||||||
|
}
|
@@ -11,7 +11,7 @@
|
|||||||
</vbox>
|
</vbox>
|
||||||
<toolbarseparator />
|
<toolbarseparator />
|
||||||
<menuitem command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="PanelUI-zen-profiles-item"></menuitem>
|
<menuitem command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="PanelUI-zen-profiles-item"></menuitem>
|
||||||
<menuitem oncommand="alert('todo: open about:profiles!');" data-l10n-id="appmenuitem-new-zen-profiles-tab" class="PanelUI-zen-profiles-item"></menuitem>
|
<menuitem command="Tools:ZenProfiles" data-l10n-id="appmenuitem-new-zen-profiles-tab" class="PanelUI-zen-profiles-item"></menuitem>
|
||||||
<menuitem oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenuitem-new-zen-create-profile" class="PanelUI-zen-profiles-item"></menuitem>
|
<menuitem oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenuitem-new-zen-create-profile" class="PanelUI-zen-profiles-item"></menuitem>
|
||||||
</vbox>
|
</vbox>
|
||||||
</panelview>
|
</panelview>
|
2
src/browser/base/content/zen-scripts.jar.inc.mn
Normal file
2
src/browser/base/content/zen-scripts.jar.inc.mn
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
content/browser/zen-browser-places.js (content/zen-browser-places.js)
|
||||||
|
content/browser/zen-browser.js (content/zen-browser.js)
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
|
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
|
||||||
index e3eb0e6e5f30152905456a07cfe532fe173375fb..15e742e4cfd9df8eef815f80a4d668f118108c4c 100644
|
index e3eb0e6e5f30152905456a07cfe532fe173375fb..9d356d62421d779f9e16f6761cce97826c7943ed 100644
|
||||||
--- a/browser/base/jar.mn
|
--- a/browser/base/jar.mn
|
||||||
+++ b/browser/base/jar.mn
|
+++ b/browser/base/jar.mn
|
||||||
@@ -105,3 +105,6 @@ browser.jar:
|
@@ -105,3 +105,6 @@ browser.jar:
|
||||||
@@ -8,4 +8,5 @@ index e3eb0e6e5f30152905456a07cfe532fe173375fb..15e742e4cfd9df8eef815f80a4d668f1
|
|||||||
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
|
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
|
||||||
+
|
+
|
||||||
+#include content/zen-avatars/jar.inc.mn
|
+#include content/zen-avatars/jar.inc.mn
|
||||||
+ content/browser/zen-browser-places.js (content/zen-browser-places.js)
|
+#include content/zen-scripts.jar.inc.mn
|
||||||
|
\ No newline at end of file
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
diff --git a/browser/components/aboutwelcome/actors/AboutWelcomeParent.sys.mjs b/browser/components/aboutwelcome/actors/AboutWelcomeParent.sys.mjs
|
|
||||||
index 1eb77da0d8f9db02b3afad9d3cdd438cb6f58cd7..25806b026b4da05add168f2f0e556a877d772e1a 100644
|
|
||||||
--- a/browser/components/aboutwelcome/actors/AboutWelcomeParent.sys.mjs
|
|
||||||
+++ b/browser/components/aboutwelcome/actors/AboutWelcomeParent.sys.mjs
|
|
||||||
@@ -42,9 +42,9 @@ const AWTerminate = {
|
|
||||||
};
|
|
||||||
const LIGHT_WEIGHT_THEMES = {
|
|
||||||
AUTOMATIC: "default-theme@mozilla.org",
|
|
||||||
- DARK: "firefox-compact-dark@mozilla.org",
|
|
||||||
- LIGHT: "firefox-compact-light@mozilla.org",
|
|
||||||
- ALPENGLOW: "firefox-alpenglow@mozilla.org",
|
|
||||||
+ DARK: "zen-compact-dark@mozilla.org",
|
|
||||||
+ LIGHT: "zen-compact-light@mozilla.org",
|
|
||||||
+ ALPENGLOW: "zen-compact-universe@mozilla.org",
|
|
||||||
};
|
|
||||||
|
|
||||||
class AboutWelcomeObserver {
|
|
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/browser/locales/en-US/browser/appExtensionFields.ftl b/browser/locales/en-US/browser/appExtensionFields.ftl
|
diff --git a/browser/locales/en-US/browser/appExtensionFields.ftl b/browser/locales/en-US/browser/appExtensionFields.ftl
|
||||||
index 09d7a076eccd4235fac66156770d8b9ae01a7d16..a4937b9470fffc187eb521f45362703909ec09b9 100644
|
index 09d7a076eccd4235fac66156770d8b9ae01a7d16..31c7632c9dce24f2e4e5135abfca96a47e961eed 100644
|
||||||
--- a/browser/locales/en-US/browser/appExtensionFields.ftl
|
--- a/browser/locales/en-US/browser/appExtensionFields.ftl
|
||||||
+++ b/browser/locales/en-US/browser/appExtensionFields.ftl
|
+++ b/browser/locales/en-US/browser/appExtensionFields.ftl
|
||||||
@@ -8,14 +8,14 @@
|
@@ -8,13 +8,13 @@
|
||||||
extension-default-theme-name-auto=System theme — auto
|
extension-default-theme-name-auto=System theme — auto
|
||||||
extension-default-theme-description=Follow the operating system setting for buttons, menus, and windows.
|
extension-default-theme-description=Follow the operating system setting for buttons, menus, and windows.
|
||||||
|
|
||||||
@@ -15,9 +15,7 @@ index 09d7a076eccd4235fac66156770d8b9ae01a7d16..a4937b9470fffc187eb521f453627039
|
|||||||
extension-firefox-compact-dark-description=A theme with a dark color scheme.
|
extension-firefox-compact-dark-description=A theme with a dark color scheme.
|
||||||
|
|
||||||
-extension-firefox-alpenglow-name=Firefox Alpenglow
|
-extension-firefox-alpenglow-name=Firefox Alpenglow
|
||||||
-extension-firefox-alpenglow-description=Use a colorful appearance for buttons, menus, and windows.
|
+extension-firefox-alpenglow-name=Zen Universe
|
||||||
+extension-zen-compact-universe-name=Zen Universe
|
extension-firefox-alpenglow-description=Use a colorful appearance for buttons, menus, and windows.
|
||||||
+extension-zen-compact-universe-description=Use a colorful appearance for buttons, menus, and windows.
|
|
||||||
|
|
||||||
## Colorway Themes
|
## Colorway Themes
|
||||||
## These themes are variants of a colorway. The colorway is specified in the
|
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs
|
|
||||||
index 7cfea4b705a1338b1eb5c4f255808aeac4bdb819..58bf9d46222f1032c71a1385109ca4734b777629 100644
|
|
||||||
--- a/browser/themes/BuiltInThemeConfig.sys.mjs
|
|
||||||
+++ b/browser/themes/BuiltInThemeConfig.sys.mjs
|
|
||||||
@@ -22,19 +22,19 @@ export const BuiltInThemeConfig = new Map([
|
|
||||||
[
|
|
||||||
"firefox-compact-light@mozilla.org",
|
|
||||||
{
|
|
||||||
- version: "1.2",
|
|
||||||
+ version: "1.3",
|
|
||||||
path: "resource://builtin-themes/light/",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"firefox-compact-dark@mozilla.org",
|
|
||||||
{
|
|
||||||
- version: "1.2",
|
|
||||||
+ version: "1.3",
|
|
||||||
path: "resource://builtin-themes/dark/",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
- "firefox-alpenglow@mozilla.org",
|
|
||||||
+ "zen-compact-universe@mozilla.org",
|
|
||||||
{
|
|
||||||
version: "1.4",
|
|
||||||
path: "resource://builtin-themes/alpenglow/",
|
|
@@ -1,24 +1,17 @@
|
|||||||
diff --git a/browser/themes/addons/alpenglow/manifest.json b/browser/themes/addons/alpenglow/manifest.json
|
diff --git a/browser/themes/addons/alpenglow/manifest.json b/browser/themes/addons/alpenglow/manifest.json
|
||||||
index 05a25e13915edee3ba51ed1c1b5569faa70cd536..9d58f14305c27d4fb4a68c9182aafe0826826746 100644
|
index 05a25e13915edee3ba51ed1c1b5569faa70cd536..5a5bf6766e45d339b1b17e4b1e88b302a34025f6 100644
|
||||||
--- a/browser/themes/addons/alpenglow/manifest.json
|
--- a/browser/themes/addons/alpenglow/manifest.json
|
||||||
+++ b/browser/themes/addons/alpenglow/manifest.json
|
+++ b/browser/themes/addons/alpenglow/manifest.json
|
||||||
@@ -3,137 +3,99 @@
|
@@ -7,133 +7,94 @@
|
||||||
|
|
||||||
"browser_specific_settings": {
|
|
||||||
"gecko": {
|
|
||||||
- "id": "firefox-alpenglow@mozilla.org"
|
|
||||||
+ "id": "zen-compact-universe@mozilla.org"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
- "name": "Firefox Alpenglow",
|
- "name": "Firefox Alpenglow",
|
||||||
- "description": "Use a colorful appearance for buttons, menus, and windows.",
|
- "description": "Use a colorful appearance for buttons, menus, and windows.",
|
||||||
- "version": "1.4",
|
|
||||||
+ "name": "Zen Universe (Light)",
|
+ "name": "Zen Universe (Light)",
|
||||||
+ "description": "A theme with a light color scheme.",
|
+ "description": "A theme with a light color scheme.",
|
||||||
+ "author": "Zen",
|
+ "author": "Zen",
|
||||||
+ "version": "1.3",
|
"version": "1.4",
|
||||||
+
|
|
||||||
"icons": { "32": "icon.svg" },
|
"icons": { "32": "icon.svg" },
|
||||||
|
|
||||||
"theme": {
|
"theme": {
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.sys.mjs b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.sys.mjs
|
|
||||||
index 91c3349ec737aa12518b596f1e6278eb27f0f5ec..15331c3d170acb1b12c7f4a9ac6134e497b31a96 100644
|
|
||||||
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.sys.mjs
|
|
||||||
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.sys.mjs
|
|
||||||
@@ -42,7 +42,7 @@ export var LightweightThemes = {
|
|
||||||
selectors: [],
|
|
||||||
async applyConfig() {
|
|
||||||
let addon = await AddonManager.getAddonByID(
|
|
||||||
- "firefox-alpenglow@mozilla.org"
|
|
||||||
+ "zen-compact-universe@mozilla.org"
|
|
||||||
);
|
|
||||||
await addon.enable();
|
|
||||||
},
|
|
Reference in New Issue
Block a user