ダミーのタブかどうかの判別を別メソッドに
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4633 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
b0a80ab2f4
commit
b236986fb0
@ -1059,6 +1059,14 @@ var TreeStyleTabService = {
|
|||||||
).numberValue;
|
).numberValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isGroupTab : function(aTab)
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
aTab.linkedBrowser.sessionHistory.count == 1 &&
|
||||||
|
aTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') > -1
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
/* Session Store API */
|
/* Session Store API */
|
||||||
|
|
||||||
getTabValue : function(aTab, aKey)
|
getTabValue : function(aTab, aKey)
|
||||||
|
@ -1491,11 +1491,9 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
this.partTab(tab, true);
|
this.partTab(tab, true);
|
||||||
|
|
||||||
if (parentTab.linkedBrowser.sessionHistory.count == 1 &&
|
if (this.isGroupTab(parentTab) && !this.getDescendantTabs(parentTab).length) {
|
||||||
parentTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') > -1 &&
|
|
||||||
!this.getDescendantTabs(parentTab).length) {
|
|
||||||
if (nextFocusedTab == parentTab)
|
if (nextFocusedTab == parentTab)
|
||||||
nextFocusedTab = null;
|
nextFocusedTab = this.getNextSiblingTab(parentTab) || this.getPreviousSiblingTab(parentTab);
|
||||||
b.removeTab(parentTab);
|
b.removeTab(parentTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,5 +240,7 @@ function test_cleanUpTabsArray()
|
|||||||
sv.registerTabFocusAllowance(func)
|
sv.registerTabFocusAllowance(func)
|
||||||
sv.registerExpandTwistyAreaAllowance(func)
|
sv.registerExpandTwistyAreaAllowance(func)
|
||||||
|
|
||||||
|
sv.isGroupTab(tab)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user