Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 78f8630

Browse files
committed
🐛 Fix the sidebar creation
1 parent b330a92 commit 78f8630

File tree

3 files changed

+34
-18
lines changed

3 files changed

+34
-18
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"package": "gluon package",
2323
"ff-version": "gluon ff-version",
2424
"licenseCheck": "gluon license-check",
25-
"gluon": "gluon"
25+
"gluon": "gluon",
26+
"reset": "gluon reset"
2627
}
2728
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
2+
index f3134d5a9a01b7965eede5695def5afef4a66d6b..626fba18a7e9341731f6b71a98197695d63d7c6c 100644
3+
--- a/browser/base/content/browser-menubar.inc
4+
+++ b/browser/base/content/browser-menubar.inc
5+
@@ -153,6 +153,9 @@
6+
type="checkbox"
7+
class="sync-ui-item"
8+
oncommand="SidebarUI.toggle('viewTabsSidebar');" data-l10n-id="menu-view-synced-tabs-sidebar"/>
9+
+ <menuitem id="menu_downloadsSidebar"
10+
+ type="checkbox"
11+
+ oncommand="SidebarUI.toggle('viewDownloadsSidebar');" data-l10n-id="navbar-downloads"/>
12+
</menupopup>
13+
</menu>
14+
<menuseparator/>

src/browser/base/content/browser-sidebar-js.patch

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/base/content/browser-sidebar.js b/browser/base/content/browser-sidebar.js
2-
index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc949f6d8df 100644
2+
index f09e37fc42f7754f7f3687884ead25124c1b2076..e1833bbfd8a8ed7da767349f886d554f3dd795f3 100644
33
--- a/browser/base/content/browser-sidebar.js
44
+++ b/browser/base/content/browser-sidebar.js
55
@@ -11,6 +11,10 @@ var SidebarUI = {
@@ -37,22 +37,23 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
3737
}),
3838
],
3939
[
40-
@@ -47,8 +54,36 @@ var SidebarUI = {
40+
@@ -47,8 +54,37 @@ var SidebarUI = {
4141
elementId: "sidebar-switcher-tabs",
4242
url: "chrome://browser/content/syncedtabs/sidebar.xhtml",
4343
menuId: "menu_tabsSidebar",
4444
+ iconurl: "chrome://browser/skin/tab.svg",
45-
}),
46-
],
45+
+ }),
46+
+ ],
4747
+ [
48-
+ "sidebar-downloads",
49-
+ {
48+
+ "viewDownloadsSidebar",
49+
+ makeSidebar({
50+
+ elementId: "sidebar-switcher-downloads",
5051
+ title: "Downloads",
5152
+ url: "about:downloads",
52-
+ iconurl: "chrome://browser/skin/downloads/downloads.svg",
53-
+ isBottom: false,
54-
+ },
55-
+ ],
53+
+ menuId: "menu_downloadsSidebar",
54+
+ iconurl: "chrome://browser/skin/downloads/downloads.svg"
55+
}),
56+
],
5657
+ [
5758
+ "sidebar-view-addons",
5859
+ {
@@ -74,7 +75,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
7475
]));
7576
},
7677

77-
@@ -61,6 +96,8 @@ var SidebarUI = {
78+
@@ -61,6 +97,8 @@ var SidebarUI = {
7879
return (this._browser = document.getElementById("sidebar"));
7980
},
8081
POSITION_START_PREF: "sidebar.position_start",
@@ -83,7 +84,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
8384
DEFAULT_SIDEBAR_ID: "viewBookmarksSidebar",
8485

8586
// lastOpenedId is set in show() but unlike currentID it's not cleared out on hide
86-
@@ -78,6 +115,8 @@ var SidebarUI = {
87+
@@ -78,6 +116,8 @@ var SidebarUI = {
8788
},
8889
_splitter: null,
8990
_icon: null,
@@ -92,7 +93,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
9293
_reversePositionButton: null,
9394
_switcherPanel: null,
9495
_switcherTarget: null,
95-
@@ -110,10 +149,40 @@ var SidebarUI = {
96+
@@ -110,10 +150,40 @@ var SidebarUI = {
9697
this._switcherTarget = document.getElementById("sidebar-switcher-target");
9798
this._switcherArrow = document.getElementById("sidebar-switcher-arrow");
9899

@@ -133,7 +134,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
133134
this._inited = true;
134135

135136
Services.obs.addObserver(this, "intl:app-locales-changed");
136-
@@ -159,17 +228,26 @@ var SidebarUI = {
137+
@@ -159,17 +229,26 @@ var SidebarUI = {
137138
/**
138139
* The handler for Services.obs.addObserver.
139140
**/
@@ -164,7 +165,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
164165
}
165166
}
166167
},
167-
@@ -573,6 +651,10 @@ var SidebarUI = {
168+
@@ -573,6 +652,10 @@ var SidebarUI = {
168169
this._box.setAttribute("sidebarcommand", commandID);
169170
this.lastOpenedId = commandID;
170171

@@ -175,7 +176,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
175176
let { url, title, sourceL10nEl } = this.sidebars.get(commandID);
176177
this.title = title;
177178
// Keep the title element in sync with any l10n changes.
178-
@@ -618,6 +700,26 @@ var SidebarUI = {
179+
@@ -618,6 +701,26 @@ var SidebarUI = {
179180

180181
this.selectMenuItem("");
181182

@@ -202,7 +203,7 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..5c75aaac3396ee8a837458942fc9bfc9
202203
// Replace the document currently displayed in the sidebar with about:blank
203204
// so that we can free memory by unloading the page. We need to explicitly
204205
// create a new content viewer because the old one doesn't get destroyed
205-
@@ -641,25 +743,112 @@ var SidebarUI = {
206+
@@ -641,25 +744,112 @@ var SidebarUI = {
206207
* none if the argument is an empty string.
207208
*/
208209
selectMenuItem(commandID) {

0 commit comments

Comments
 (0)