* 折り畳まれたツリーを閉じたときにウィンドウが閉じられる場合、それが最後のタブであった時にセッション保存の対象になっていなかったのを修正
* https://bugzilla.mozilla.org/show_bug.cgi?id=406216 への対処はもう不要なので、削除 git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5563 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
f95276a51b
commit
2c589505a9
@ -2465,18 +2465,22 @@ catch(e) {
|
||||
},
|
||||
warnAboutClosingTabSubTreeOf : function(aTab)
|
||||
{
|
||||
if (
|
||||
!aTab ||
|
||||
(
|
||||
this.getTreePref('closeParentBehavior') != this.CLOSE_PARENT_BEHAVIOR_CLOSE &&
|
||||
!this.isSubtreeCollapsed(aTab)
|
||||
)
|
||||
)
|
||||
if (!this.shouldCloseTabSubTreeOf(aTab))
|
||||
return true;
|
||||
|
||||
var tabs = [aTab].concat(this.getDescendantTabs(aTab));
|
||||
return this.warnAboutClosingTabs(tabs.length);
|
||||
},
|
||||
shouldCloseTabSubTreeOf : function(aTab)
|
||||
{
|
||||
return (
|
||||
aTab &&
|
||||
(
|
||||
this.getTreePref('closeParentBehavior') == this.CLOSE_PARENT_BEHAVIOR_CLOSE ||
|
||||
this.isSubtreeCollapsed(aTab)
|
||||
)
|
||||
);
|
||||
},
|
||||
warnAboutClosingTabs : function(aTabsCount)
|
||||
{
|
||||
if (
|
||||
|
@ -483,12 +483,16 @@ TreeStyleTabBrowser.prototype = {
|
||||
));
|
||||
}
|
||||
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=406216
|
||||
if ('_beginRemoveTab' in b) {
|
||||
eval('b._beginRemoveTab = '+b._beginRemoveTab.toSource().replace(
|
||||
'for (let i = 0; i < l; ++i) {',
|
||||
'l = this.mTabs.length; $&'
|
||||
));
|
||||
eval('b._beginRemoveTab = '+
|
||||
b._beginRemoveTab.toSource().replace(
|
||||
'if (l == 1) {',
|
||||
'if (l == 1 || this.treeStyleTab.shouldCloseTabSubTreeOf(aTab)) {'
|
||||
).replace(
|
||||
'this._removingTabs.length == 0',
|
||||
'(this.treeStyleTab.shouldCloseTabSubTreeOf(aTab) || $&)'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
eval('b.removeCurrentTab = '+b.removeCurrentTab.toSource().replace(
|
||||
|
Loading…
Reference in New Issue
Block a user