From 1da510bc261ed9f6f0c88b1d52ec64fbc3a9305e Mon Sep 17 00:00:00 2001 From: piro Date: Sun, 24 Feb 2008 08:11:17 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BB=96=E3=81=AE=E3=82=A6=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=82=A6=E3=81=8B=E3=82=89=E3=81=AE=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=81=AE=E3=83=89=E3=83=A9=E3=83=83=E3=82=B0=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= 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@1869 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 7 ++++ content/treestyletab/treestyletabbrowser.js | 41 ++++++++++++++++----- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 92fea2b6..4dc1d53c 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -42,6 +42,7 @@ var TreeStyleTabService = { kACTION_ATTACH : 2, kACTION_PART : 4, kACTION_DUPLICATE : 8, + kACTION_MOVE_FROM_OTHER_WINDOW : 16, kTABBAR_TOP : 1, kTABBAR_BOTTOM : 2, @@ -885,6 +886,12 @@ catch(e) { if (dropActionInfo.position == TreeStyleTabService.kDROP_ON) TSTTabBrowser.treeStyleTab.attachTabTo(newTab, dropActionInfo.target); ]]> + ).replace( // Firefox 3, dragging tab from another window + 'else if (draggedTab) {', + <> ).replace( /(this.loadOneTab\([^;]+\));/, <> aTab._tPos) newIndex--; + if (aInfo.insertBefore && newIndex > tab._tPos) newIndex--; self.internallyTabMoving = true; - b.moveTabTo(aTab, newIndex); - self.collapseExpandTab(aTab, false); + b.moveTabTo(tab, newIndex); + self.collapseExpandTab(tab, false); self.internallyTabMoving = false; + + if (remoteBrowser) + remoteBrowser.removeTab(aTab); }); if (aInfo.action & this.kACTION_DUPLICATE && aInfo.action & this.kACTION_ATTACH) this.attachTabsOnDrop(newRoots, aInfo.parent); + if (windowShouldBeClosed) + remoteWindow.close(); + b.movingSelectedTabs = false; // Multiple Tab Handler b.duplicatingSelectedTabs = false; // Multiple Tab Handler }