From 33de904ff888f2852119141cbad3f040f1439c1a Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 17 Oct 2007 13:25:50 +0000 Subject: [PATCH] =?UTF-8?q?Split=20Browser=E3=81=A8=E3=81=AE=E9=80=A3?= =?UTF-8?q?=E6=90=BA=E3=82=92=E5=BC=B7=E5=8C=96?= 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@1216 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index ded5b4a7..c682c387 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -173,6 +173,10 @@ var TreeStyleTabService = { window.removeEventListener('load', this, false); + var appcontent = document.getElementById('appcontent'); + appcontent.addEventListener('SubBrowserAdded', this, false); + appcontent.addEventListener('SubBrowserRemoveRequest', this, false); + this.addPrefListener(this); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.'); @@ -257,6 +261,8 @@ var TreeStyleTabService = { this.destroyTabBrowser(gBrowser); window.removeEventListener('unload', this, false); + appcontent.removeEventListener('SubBrowserAdded', this, false); + appcontent.removeEventListener('SubBrowserRemoveRequest', this, false); this.removePrefListener(this); @@ -324,6 +330,14 @@ var TreeStyleTabService = { case 'popupshowing': // this.showHideMenuItems(aEvent.target); break; + + case 'SubBrowserAdded': + this.initTabBrowser(aEvent.originalTarget.browser); + break; + + case 'SubBrowserRemoveRequest': + this.destroyTabBrowser(aEvent.originalTarget.browser); + break; } },