From a3b2a53a7c6f23c292c914b9d6ca3aa3d354823a Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 17 Jun 2008 12:55:05 +0000 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8B=95=E3=81=A7=E9=9A=A0=E3=81=99?= =?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=89=E3=81=AE=E5=88=87=E3=82=8A=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E6=99=82=E3=81=AB=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E5=B9=85=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E5=BE=A9?= =?UTF-8?q?=E5=85=83=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= 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@2660 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 8 ++++---- content/treestyletab/treestyletabbrowser.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 7227e287..684e6f37 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1429,8 +1429,7 @@ catch(e) { onTabbarResized : function(aEvent) { var b = this.getTabBrowserFromChild(aEvent.currentTarget); - if (this.autoHideMode == this.kAUTOHIDE_MODE_SHRINK && - !b.treeStyleTab.tabbarExpanded) + if (!b.treeStyleTab.tabbarExpanded) this.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width); else this.setTreePref('tabbar.width', b.mStrip.boxObject.width); @@ -1684,12 +1683,13 @@ catch(e) { break; case 'extensions.treestyletab.tabbar.autoHide.mode': - this.autoHideMode = this.getTreePref('tabbar.autoHide.mode'); + // don't set on this time, because appearance of all tabbrowsers are not updated yet. + // this.autoHideMode = this.getTreePref('tabbar.autoHide.mode'); case 'extensions.treestyletab.tabbar.autoShow.accelKeyDown': case 'extensions.treestyletab.tabbar.autoShow.tabSwitch': case 'extensions.treestyletab.tabbar.autoShow.feedback': if ( - this.autoHideMode && + this.getTreePref('tabbar.autoHide.mode') && ( this.getTreePref('tabbar.autoShow.accelKeyDown') || this.getTreePref('tabbar.autoShow.tabSwitch') || diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 1cb32053..21c5cb30 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -877,8 +877,12 @@ TreeStyleTabBrowser.prototype = { case 'extensions.treestyletab.tabbar.autoHide.mode': this.endAutoHide(); - if (value != this.kAUTOHIDE_MODE_DISABLED) - this.startAutoHide(); + // update internal property after the appearance of the tab bar is updated. + window.setTimeout(function(aSelf) { + aSelf.autoHideMode = value; + if (value != aSelf.kAUTOHIDE_MODE_DISABLED) + aSelf.startAutoHide(); + }, 0, this); break; case 'extensions.treestyletab.tabbar.autoShow.mousemove': @@ -3126,6 +3130,9 @@ TreeStyleTabBrowser.prototype = { if (!this.autoHideEnabled) return; this.autoHideEnabled = false; + if (!this.autoHideShown) + this.showHideTabbarInternal(); + this.mTabBrowser.removeEventListener('mousedown', this, true); this.mTabBrowser.removeEventListener('mouseup', this, true); this.mTabBrowser.removeEventListener('scroll', this, true);