Minefield 4.0b2preでプライベートブラウジングモードに入る時にタブが見えなくなる事がある問題を修正( http://piro.sakura.ne.jp/cgi-bin/bbs.cgi?2736

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6853 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-07-05 13:29:32 +00:00
parent 2f96001a88
commit 1c45cad8a6
2 changed files with 10 additions and 7 deletions

View File

@ -767,6 +767,7 @@ TreeStyleTabBrowser.prototype = {
this.ObserverService.addObserver(this, 'TreeStyleTab:indentModified', false); this.ObserverService.addObserver(this, 'TreeStyleTab:indentModified', false);
this.ObserverService.addObserver(this, 'TreeStyleTab:collapseExpandAllSubtree', 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.ObserverService.addObserver(this, 'TreeStyleTab:changeTreeViewAvailability', false);
this.addPrefListener(this); this.addPrefListener(this);
@ -1561,6 +1562,7 @@ TreeStyleTabBrowser.prototype = {
this.ObserverService.removeObserver(this, 'TreeStyleTab:indentModified'); this.ObserverService.removeObserver(this, 'TreeStyleTab:indentModified');
this.ObserverService.removeObserver(this, 'TreeStyleTab:collapseExpandAllSubtree'); this.ObserverService.removeObserver(this, 'TreeStyleTab:collapseExpandAllSubtree');
this.ObserverService.removeObserver(this, 'private-browsing-change-granted');
this.ObserverService.removeObserver(this, 'TreeStyleTab:changeTreeViewAvailability'); this.ObserverService.removeObserver(this, 'TreeStyleTab:changeTreeViewAvailability');
this.removePrefListener(this); this.removePrefListener(this);
@ -1614,7 +1616,7 @@ TreeStyleTabBrowser.prototype = {
break; break;
case 'TreeStyleTab:collapseExpandAllSubtree': case 'TreeStyleTab:collapseExpandAllSubtree':
if (aSubject == window) { if (!aSubject || aSubject == window) {
aData = String(aData); aData = String(aData);
this.collapseExpandAllSubtree( this.collapseExpandAllSubtree(
aData.indexOf('collapse') > -1, aData.indexOf('collapse') > -1,
@ -1623,6 +1625,13 @@ TreeStyleTabBrowser.prototype = {
} }
break; break;
case 'private-browsing-change-granted':
this.collapseExpandAllSubtree(false, true);
window.setTimeout(function(aSelf) {
aSelf.updateFloatingTabbar();
}, 0, this);
break;
case 'TreeStyleTab:changeTreeViewAvailability': case 'TreeStyleTab:changeTreeViewAvailability':
this.treeViewEnabled = (aData != 'false'); this.treeViewEnabled = (aData != 'false');
break; break;

View File

@ -254,7 +254,6 @@ var TreeStyleTabUtils = {
.indexOf('mac') > -1; .indexOf('mac') > -1;
this.addPrefListener(this); this.addPrefListener(this);
this.ObserverService.addObserver(this, 'private-browsing-change-granted', false);
this.onPrefChange('extensions.treestyletab.indent'); this.onPrefChange('extensions.treestyletab.indent');
this.onPrefChange('extensions.treestyletab.clickOnIndentSpaces.enabled'); this.onPrefChange('extensions.treestyletab.clickOnIndentSpaces.enabled');
@ -292,11 +291,6 @@ var TreeStyleTabUtils = {
case 'nsPref:changed': case 'nsPref:changed':
this.onPrefChange(aData); this.onPrefChange(aData);
return; return;
case 'private-browsing-change-granted':
if (aData == 'enter')
this.ObserverService.notifyObservers(window, 'TreeStyleTab:collapseExpandAllSubtree', 'expand-now');
return;
} }
}, },