From 1c45cad8a6281237153a65c7c2cf9d575ba3f6e4 Mon Sep 17 00:00:00 2001 From: piro Date: Mon, 5 Jul 2010 13:29:32 +0000 Subject: [PATCH] =?UTF-8?q?Minefield=204.0b2pre=E3=81=A7=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=BC=E3=83=88=E3=83=96=E3=83=A9=E3=82=A6?= =?UTF-8?q?=E3=82=B8=E3=83=B3=E3=82=B0=E3=83=A2=E3=83=BC=E3=83=89=E3=81=AB?= =?UTF-8?q?=E5=85=A5=E3=82=8B=E6=99=82=E3=81=AB=E3=82=BF=E3=83=96=E3=81=8C?= =?UTF-8?q?=E8=A6=8B=E3=81=88=E3=81=AA=E3=81=8F=E3=81=AA=E3=82=8B=E4=BA=8B?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=EF=BC=88=20http://piro.sakura.ne.jp/cgi-bin/bbs.cgi?= =?UTF-8?q?=3F2736=20=EF=BC=89?= 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@6853 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 11 ++++++++++- modules/utils.js | 6 ------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index e8a5c2ab..a65e69a6 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -767,6 +767,7 @@ TreeStyleTabBrowser.prototype = { this.ObserverService.addObserver(this, 'TreeStyleTab:indentModified', false); this.ObserverService.addObserver(this, 'TreeStyleTab:collapseExpandAllSubtree', false); + this.ObserverService.addObserver(this, 'private-browsing-change-granted', false); this.ObserverService.addObserver(this, 'TreeStyleTab:changeTreeViewAvailability', false); this.addPrefListener(this); @@ -1561,6 +1562,7 @@ TreeStyleTabBrowser.prototype = { this.ObserverService.removeObserver(this, 'TreeStyleTab:indentModified'); this.ObserverService.removeObserver(this, 'TreeStyleTab:collapseExpandAllSubtree'); + this.ObserverService.removeObserver(this, 'private-browsing-change-granted'); this.ObserverService.removeObserver(this, 'TreeStyleTab:changeTreeViewAvailability'); this.removePrefListener(this); @@ -1614,7 +1616,7 @@ TreeStyleTabBrowser.prototype = { break; case 'TreeStyleTab:collapseExpandAllSubtree': - if (aSubject == window) { + if (!aSubject || aSubject == window) { aData = String(aData); this.collapseExpandAllSubtree( aData.indexOf('collapse') > -1, @@ -1623,6 +1625,13 @@ TreeStyleTabBrowser.prototype = { } break; + case 'private-browsing-change-granted': + this.collapseExpandAllSubtree(false, true); + window.setTimeout(function(aSelf) { + aSelf.updateFloatingTabbar(); + }, 0, this); + break; + case 'TreeStyleTab:changeTreeViewAvailability': this.treeViewEnabled = (aData != 'false'); break; diff --git a/modules/utils.js b/modules/utils.js index bdcb8d28..8d8558f1 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -254,7 +254,6 @@ var TreeStyleTabUtils = { .indexOf('mac') > -1; this.addPrefListener(this); - this.ObserverService.addObserver(this, 'private-browsing-change-granted', false); this.onPrefChange('extensions.treestyletab.indent'); this.onPrefChange('extensions.treestyletab.clickOnIndentSpaces.enabled'); @@ -292,11 +291,6 @@ var TreeStyleTabUtils = { case 'nsPref:changed': this.onPrefChange(aData); return; - - case 'private-browsing-change-granted': - if (aData == 'enter') - this.ObserverService.notifyObservers(window, 'TreeStyleTab:collapseExpandAllSubtree', 'expand-now'); - return; } },