Split Browserとの連携を強化

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1216 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-10-17 13:25:50 +00:00
parent f7251d30f2
commit 33de904ff8

View File

@ -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;
}
},