From 451fd81141ad2c69276896299823b87acfac2447 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 18 Dec 2009 06:08:42 +0000 Subject: [PATCH] =?UTF-8?q?*=20=E3=83=84=E3=83=AA=E3=83=BC=E3=81=8C?= =?UTF-8?q?=E6=8A=98=E3=82=8A=E7=95=B3=E3=81=BE=E3=82=8C=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E6=99=82=E3=82=84=E3=83=84=E3=83=AA=E3=83=BC=E3=82=92?= =?UTF-8?q?=E5=B8=B8=E3=81=AB=E9=96=89=E3=81=98=E3=82=8B=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=AE=E6=99=82=E3=80=81=E3=82=B3=E3=83=B3=E3=83=86=E3=82=AD?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E5=86=85?= =?UTF-8?q?=E3=81=AE=E3=80=8C=E3=82=BF=E3=83=96=E3=82=92=E9=96=89=E3=81=98?= =?UTF-8?q?=E3=82=8B=E3=80=8D=E3=81=A7=E3=82=BF=E3=83=96=E3=82=92=E9=96=89?= =?UTF-8?q?=E3=81=98=E3=82=8B=E9=9A=9B=E3=81=AB=E8=A4=87=E6=95=B0=E3=81=AE?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=82=92=E9=96=89=E3=81=98=E3=81=A6=E3=82=88?= =?UTF-8?q?=E3=81=84=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B=E3=81=AE=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F=20*=20=E3=83=84=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E6=8A=98=E3=82=8A=E7=95=B3=E3=81=BE=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AB?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=82=92=E9=96=89=E3=81=98=E3=82=89=E3=82=8C?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5551 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 2 +- content/treestyletab/treestyletabbrowser.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index b34ce830..567cb5f4 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -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); diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 3351b4cb..a53f52cb 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -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); }