子タブがひとつもなくなる時はダミーの親タブを自動で閉じる

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4789 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-23 16:26:33 +00:00
parent cbf1095d49
commit e234f8ea7a

View File

@ -2967,6 +2967,16 @@ TreeStyleTabBrowser.prototype = {
var event = document.createEvent('Events'); var event = document.createEvent('Events');
event.initEvent('TreeStyleTabParted', true, true); event.initEvent('TreeStyleTabParted', true, true);
aChild.dispatchEvent(event); aChild.dispatchEvent(event);
if (this.isGroupTab(parentTab)) {
window.setTimeout(function(aSelf) {
aSelf.getTabBrowserFromChild(parentTab).removeTab(parentTab);
}, 0, this);
}
},
detachTab : function(aChild, aDontUpdateIndent) // alias
{
return this.partTab(aChild, aDontUpdateIndent);
}, },
updateTabsIndent : function(aTabs, aLevel, aProp, aJustNow) updateTabsIndent : function(aTabs, aLevel, aProp, aJustNow)