mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-15 21:30:36 +00:00
Merge branch 'zen-browser:dev' into hideemptytab
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</hbox>
|
||||
<hbox>
|
||||
<toolbarbutton id="zen-sidebar-web-panel-home" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.home();"/>
|
||||
<toolbarbutton id="zen-sidebar-web-panel-pinned" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.togglePinned(this);"/>
|
||||
<toolbarbutton id="zen-sidebar-web-panel-pinned" class="toolbarbutton-1 chromeclass-toolbar-additional" pinned="true" oncommand="gZenBrowserManagerSidebar.togglePinned(this);"/>
|
||||
<toolbarbutton id="zen-sidebar-web-panel-close" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.close();"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
@@ -33,6 +33,7 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
this.listenForPrefChanges();
|
||||
this.insertIntoContextMenu();
|
||||
this.addPositioningListeners();
|
||||
this.syncPinnedState();
|
||||
}
|
||||
|
||||
onlySafeWidthAndHeight() {
|
||||
@@ -98,6 +99,17 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
window.addEventListener('resize', this.onWindowResize.bind(this));
|
||||
}
|
||||
|
||||
syncPinnedState() {
|
||||
const sidebar = document.getElementById('zen-sidebar-web-panel');
|
||||
const pinButton = document.getElementById('zen-sidebar-web-panel-pinned');
|
||||
|
||||
if (sidebar.hasAttribute('pinned')) {
|
||||
pinButton.setAttribute('pinned', 'true');
|
||||
} else {
|
||||
pinButton.removeAttribute('pinned');
|
||||
}
|
||||
}
|
||||
|
||||
handleSplitterMouseDown(mouseDownEvent) {
|
||||
if (this._isDragging) return;
|
||||
this._isDragging = true;
|
||||
|
||||
12
src/browser/components/BrowserContentHandler-sys-mjs.patch
Normal file
12
src/browser/components/BrowserContentHandler-sys-mjs.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/browser/components/BrowserContentHandler.sys.mjs b/browser/components/BrowserContentHandler.sys.mjs
|
||||
index 7aef091c0be1cb0ea0be52268949db17032f96d9..5e9105fa671d1b1979f204fc8d3be22771998ad7 100644
|
||||
--- a/browser/components/BrowserContentHandler.sys.mjs
|
||||
+++ b/browser/components/BrowserContentHandler.sys.mjs
|
||||
@@ -1278,6 +1278,7 @@ function maybeRecordToHandleTelemetry(uri, isLaunch) {
|
||||
".avif",
|
||||
".htm",
|
||||
".html",
|
||||
+ ".jxl",
|
||||
".pdf",
|
||||
".shtml",
|
||||
".xht",
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs
|
||||
index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..6021901b427d426078d9bf713d6995ad6332dbfa 100644
|
||||
index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658514db39f 100644
|
||||
--- a/browser/components/places/PlacesUIUtils.sys.mjs
|
||||
+++ b/browser/components/places/PlacesUIUtils.sys.mjs
|
||||
@@ -58,6 +58,7 @@ class BookmarkState {
|
||||
@@ -95,7 +95,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..6021901b427d426078d9bf713d6995ad
|
||||
+ const placeholders = workspacesToRemove.map(() => '?').join(',');
|
||||
+ await db.execute(`
|
||||
+ DELETE FROM zen_bookmarks_workspaces
|
||||
+ WHERE bookmark_guid = :bookmark_guid
|
||||
+ WHERE bookmark_guid = :bookmark_guid
|
||||
+ AND workspace_uuid IN (${placeholders})
|
||||
+ `, [bookmarkGuid, ...workspacesToRemove]);
|
||||
+
|
||||
@@ -162,9 +162,9 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..6021901b427d426078d9bf713d6995ad
|
||||
aWhere,
|
||||
aWindow,
|
||||
- { aPrivate = false, userContextId = 0 } = {}
|
||||
+ { aPrivate = false, userContextId } = {}
|
||||
+ { aPrivate = false, userContextId = undefined } = {}
|
||||
) {
|
||||
+ if (!userContextId) {
|
||||
+ if (typeof userContextId == "undefined") {
|
||||
+ try {
|
||||
+ let browserWindow = getBrowserWindow(aWindow);
|
||||
+ userContextId = browserWindow.ZenWorkspaces.getDefaultContainer();
|
||||
|
||||
12
src/browser/installer/windows/msix/AppxManifest-xml-in.patch
Normal file
12
src/browser/installer/windows/msix/AppxManifest-xml-in.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/browser/installer/windows/msix/AppxManifest.xml.in b/browser/installer/windows/msix/AppxManifest.xml.in
|
||||
index b81a73518a183b7b1d178793886c66f44651058d..89690a4177229b70013bcf35ec1d805fff7e1b26 100644
|
||||
--- a/browser/installer/windows/msix/AppxManifest.xml.in
|
||||
+++ b/browser/installer/windows/msix/AppxManifest.xml.in
|
||||
@@ -61,6 +61,7 @@
|
||||
<uap:FileType>.avif</uap:FileType>
|
||||
<uap:FileType>.htm</uap:FileType>
|
||||
<uap:FileType>.html</uap:FileType>
|
||||
+ <uap:FileType>.jxl</uap:FileType>
|
||||
<uap:FileType>.pdf</uap:FileType>
|
||||
<uap:FileType>.shtml</uap:FileType>
|
||||
<uap:FileType>.xht</uap:FileType>
|
||||
46
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
46
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
|
||||
index b7f8e1453089ab5f1945e1a65f038e17b5273571..5297f5ed70fe3446e55be37df486fb4ad791a446 100644
|
||||
--- a/browser/installer/windows/nsis/shared.nsh
|
||||
+++ b/browser/installer/windows/nsis/shared.nsh
|
||||
@@ -513,6 +513,7 @@ ${RemoveDefaultBrowserAgentShortcut}
|
||||
${AddAssociationIfNoneExist} ".svg" "FirefoxHTML$5"
|
||||
${AddAssociationIfNoneExist} ".webp" "FirefoxHTML$5"
|
||||
${AddAssociationIfNoneExist} ".avif" "FirefoxHTML$5"
|
||||
+ ${AddAssociationIfNoneExist} ".jxl" "FirefoxHTML$5"
|
||||
|
||||
${AddAssociationIfNoneExist} ".pdf" "FirefoxPDF$5"
|
||||
|
||||
@@ -609,6 +610,7 @@ ${RemoveDefaultBrowserAgentShortcut}
|
||||
WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".svg" "FirefoxHTML$2"
|
||||
WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".webp" "FirefoxHTML$2"
|
||||
WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".avif" "FirefoxHTML$2"
|
||||
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".jxl" "FirefoxHTML$2"
|
||||
|
||||
WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".pdf" "FirefoxPDF$2"
|
||||
|
||||
@@ -681,6 +683,7 @@ ${RemoveDefaultBrowserAgentShortcut}
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".webm"
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".webp"
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".avif"
|
||||
+ ${WriteApplicationsSupportedType} ${RegKey} ".jxl"
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".xht"
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".xhtml"
|
||||
${WriteApplicationsSupportedType} ${RegKey} ".xml"
|
||||
@@ -1728,6 +1731,8 @@ Function SetAsDefaultAppUserHKCU
|
||||
Pop $0
|
||||
AppAssocReg::SetAppAsDefault "$R9" ".avif" "file"
|
||||
Pop $0
|
||||
+ AppAssocReg::SetAppAsDefault "$R9" ".jxl" "file"
|
||||
+ Pop $0
|
||||
AppAssocReg::SetAppAsDefault "$R9" ".xht" "file"
|
||||
Pop $0
|
||||
AppAssocReg::SetAppAsDefault "$R9" ".xhtml" "file"
|
||||
@@ -1857,7 +1862,7 @@ FunctionEnd
|
||||
; uninstalled.
|
||||
|
||||
; Do all of that twice, once for the local machine and once for the current user
|
||||
-
|
||||
+
|
||||
; Remove protocol handlers
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\Classes\${_PROTOCOL}\DefaultIcon" ""
|
||||
12
src/browser/installer/windows/nsis/uninstaller-nsi.patch
Normal file
12
src/browser/installer/windows/nsis/uninstaller-nsi.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi
|
||||
index 559c8b46ee06bc42c91da49b5d9e397fe8ff6126..62094a5d98712a41a607ba01ca2adfa1e4f51ccd 100644
|
||||
--- a/browser/installer/windows/nsis/uninstaller.nsi
|
||||
+++ b/browser/installer/windows/nsis/uninstaller.nsi
|
||||
@@ -507,6 +507,7 @@ Section "Uninstall"
|
||||
${un.RegCleanFileHandler} ".svg" "FirefoxHTML-$AppUserModelID"
|
||||
${un.RegCleanFileHandler} ".webp" "FirefoxHTML-$AppUserModelID"
|
||||
${un.RegCleanFileHandler} ".avif" "FirefoxHTML-$AppUserModelID"
|
||||
+ ${un.RegCleanFileHandler} ".jxl" "FirefoxHTML-$AppUserModelID"
|
||||
|
||||
${un.RegCleanFileHandler} ".pdf" "FirefoxPDF-$AppUserModelID"
|
||||
|
||||
Reference in New Issue
Block a user