init autohide module with delay

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-05-26 00:52:28 +09:00
parent 08d63d74a2
commit 01b34dc8b9
2 changed files with 15 additions and 9 deletions

View File

@ -165,6 +165,17 @@ var TreeStyleTabService = {
kSEARCH_RESULT_DO_NOT_ATTACH : 0,
kSEARCH_RESULT_ATTACH_IF_SELECTED : 1,
kSEARCH_RESULT_ATTACH_ALWAYS : 2,
get isAutoHide()
{
return window.fullScreen ?
(
window.fullScreen &&
this.getPref('browser.fullscreen.autohide') &&
this.getTreePref('tabbar.autoHide.mode.fullscreen')
) :
this.getTreePref('tabbar.autoHide.mode');
},
/* Initializing */
@ -378,7 +389,9 @@ var TreeStyleTabService = {
this.processRestoredTabs();
this.updateTabsOnTop();
this.onPrefChange('extensions.treestyletab.tabbar.autoHide.mode');
// Init autohide service only if it have to be activated.
if (this.isAutoHide)
this.onPrefChange('extensions.treestyletab.tabbar.autoHide.mode');
this.onPrefChange('extensions.treestyletab.tabbar.style');
this.onPrefChange('extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut');
},

View File

@ -536,14 +536,7 @@ TreeStyleTabBrowser.prototype = {
this._readyToInitDNDObservers();
// Init autohide service only if it have to be activated.
if (window.fullScreen ?
(
window.fullScreen &&
this.getPref('browser.fullscreen.autohide') &&
this.getTreePref('tabbar.autoHide.mode.fullscreen')
) :
this.getTreePref('tabbar.autoHide.mode')
)
if (this.isAutoHide)
this.autoHide;
this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_INITIALIZE);