* ツリーが折り畳まれている時やツリーを常に閉じる設定の時、コンテキストメニュー内の「タブを閉じる」でタブを閉じる際に複数のタブを閉じてよいかどうかの確認を表示するようにした

* ツリーが折り畳まれていない場合にタブを閉じられなくなっていたのを修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5551 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-12-18 06:08:42 +00:00
parent 58686afd07
commit 451fd81141
2 changed files with 14 additions and 3 deletions

View File

@ -2465,7 +2465,7 @@ catch(e) {
!this.isSubtreeCollapsed(aTab)
)
)
return false;
return true;
var tabs = [aTab].concat(this.getDescendantTabs(aTab));
return this.warnAboutClosingTabs(tabs.length);

View File

@ -552,8 +552,19 @@ TreeStyleTabBrowser.prototype = {
}, 0, this, b, tabContextMenu);
}
let (allTabPopup) {
allTabPopup = document.getAnonymousElementByAttribute(b.mTabContainer, 'anonid', 'alltabs-popup');
let (removeTabItem = document.getAnonymousElementByAttribute(b, 'id', 'context_closeTab')) {
if (removeTabItem) {
removeTabItem.setAttribute(
'oncommand',
removeTabItem.getAttribute('oncommand').replace(
/(tabbrowser\.removeTab\(([^\)]+)\))/,
'if (tabbrowser.treeStyleTab.warnAboutClosingTabSubTreeOf($2)) $1'
)
);
}
}
let (allTabPopup = document.getAnonymousElementByAttribute(b.mTabContainer, 'anonid', 'alltabs-popup')) {
if (allTabPopup)
allTabPopup.addEventListener('popupshowing', this, false);
}