mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Issue #448: Pale Moon: Include pinned tabs when warning about closing tabs with more than one window
This resolves #448.
This commit is contained in:
parent
302f069f68
commit
02e9ee9e81
1 changed files with 16 additions and 2 deletions
|
|
@ -1669,8 +1669,22 @@
|
|||
var tabsToClose;
|
||||
switch (aCloseTabs) {
|
||||
case this.closingTabsEnum.ALL:
|
||||
tabsToClose = this.tabs.length - this._removingTabs.length -
|
||||
gBrowser._numPinnedTabs;
|
||||
// If there are multiple windows, pinned tabs will be closed, so
|
||||
// we warn about them, too; if there is just one window, pinned
|
||||
// tabs should come back on restart, so exclude them from warning.
|
||||
var numberOfWindows = 0;
|
||||
var browserEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (browserEnum.hasMoreElements() && numberOfWindows < 2) {
|
||||
numberOfWindows++;
|
||||
browserEnum.getNext();
|
||||
}
|
||||
if (numberOfWindows > 1) {
|
||||
tabsToClose = this.tabs.length - this._removingTabs.length
|
||||
}
|
||||
else {
|
||||
tabsToClose = this.tabs.length - this._removingTabs.length -
|
||||
gBrowser._numPinnedTabs;
|
||||
}
|
||||
break;
|
||||
case this.closingTabsEnum.OTHER:
|
||||
tabsToClose = this.visibleTabs.length - 1 - gBrowser._numPinnedTabs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue