restoringWindow => restoringTree

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6170 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-01-29 07:54:17 +00:00
parent ff20e1dc30
commit c60b34dd74
3 changed files with 16 additions and 16 deletions

View File

@ -163,11 +163,11 @@ TreeStyleTabService.overrideExtensionsPreInit = function TSTService_overrideExte
'gBrowser.tabsToLoad = ',
<![CDATA[
gBrowser.treeStyleTab.resetAllTabs(true, true);
TreeStyleTabService.restoringWindow = true;
TreeStyleTabService.restoringTree = true;
$&]]>
).replace(
/(\}\))?$/,
'TreeStyleTabService.restoringWindow = false; $1'
'TreeStyleTabService.restoringTree = false; $1'
)
);
this.useTMPSessionAPI = true;
@ -189,7 +189,7 @@ TreeStyleTabService.overrideExtensionsPreInit = function TSTService_overrideExte
'var tabcount = ',
<![CDATA[
gBrowser.treeStyleTab.collapseExpandAllSubtree(false, true);
TreeStyleTabService.restoringWindow = true;
TreeStyleTabService.restoringTree = true;
$&]]>
));
}

View File

@ -1599,11 +1599,11 @@ catch(e) {
case 'sessionstore-windows-restored':
if (!this.useTMPSessionAPI)
this.restoringWindow = this.getRestoringTabsCount() > 1;
this.restoringTree = this.getRestoringTabsCount() > 1;
return;
}
},
restoringWindow : false,
restoringTree : false,
getRestoringTabsCount : function TSTService_getRestoringTabsCount()
{
return this.getTabsArray(this.browser)

View File

@ -1495,7 +1495,7 @@ TreeStyleTabBrowser.prototype = {
if (this.animationEnabled) {
this.updateTabCollapsed(tab, true, true);
this.updateTabCollapsed(tab, false, this.restoringWindow);
this.updateTabCollapsed(tab, false, this.restoringTree);
}
if (this.readiedToOpenDivertedTab) {
@ -1516,13 +1516,13 @@ TreeStyleTabBrowser.prototype = {
this.setTabValue(next, this.kINSERT_AFTER, tab.getAttribute(this.kID));
}
if (!TreeStyleTabService.restoringWindow &&
if (!TreeStyleTabService.restoringTree &&
!this.useTMPSessionAPI &&
!this._checkRestoringWindowTimerOnTabAdded) {
this._checkRestoringWindowTimerOnTabAdded = window.setTimeout(function(aSelf) {
aSelf._checkRestoringWindowTimerOnTabAdded = null;
if (aSelf.getRestoringTabsCount() > 1)
TreeStyleTabService.restoringWindow = true;
TreeStyleTabService.restoringTree = true;
}, 0, this);
}
@ -1969,18 +1969,18 @@ TreeStyleTabBrowser.prototype = {
以上のことからsessionstore-windows-restored が通知された段階で
_tabStillLoadingがtrueであるタブがウィンドウ内に2個以上存在して
いればそれはそのウィンドウが復元中であることを示す証拠となる
よってrestoringWindow true に設定する
よってrestoringTree true に設定する
restoringWindow true である場合はSSTabRestored が発行される度に
restoringTree true である場合はSSTabRestored が発行される度に
_tabStillLoadingがtrueであるタブの数を確認し数が1以下であれば
restoringWindow false にする
restoringTree false にする
restoringWindow 次の sessionstore-windows-restored が通知される
restoringTree 次の sessionstore-windows-restored が通知される
までは true になることはないそのため手動で連続してタブを複数
復元したとしてもそれがウィンドウ復元中のタブの復元と誤認される
心配はない
*/
var restoringMultipleTabs = TreeStyleTabService.restoringWindow;
var restoringMultipleTabs = TreeStyleTabService.restoringTree;
var tab = aTab;
var b = this.mTabBrowser;
@ -2225,7 +2225,7 @@ TreeStyleTabBrowser.prototype = {
this._restoringClosedSet = true;
this.stopRendering();
TreeStyleTabService.restoringWindow = true;
TreeStyleTabService.restoringTree = true;
var offset = 0;
indexes.forEach(function(aIndex) {
@ -2246,8 +2246,8 @@ TreeStyleTabBrowser.prototype = {
delete aEvent.originalTarget.__treestyletab__restoredByUndoCloseTab;
// update the status for the next restoring
if (!this.useTMPSessionAPI && TreeStyleTabService.restoringWindow)
TreeStyleTabService.restoringWindow = TreeStyleTabService.getRestoringTabsCount() > 0;
if (!this.useTMPSessionAPI && TreeStyleTabService.restoringTree)
TreeStyleTabService.restoringTree = TreeStyleTabService.getRestoringTabsCount() > 0;
},
onTabSelect : function TSTBrowser_onTabSelect(aEvent)