Bug 675589 - Group all session restore menu items together. r=IanN
This commit is contained in:
Родитель
4764809fc0
Коммит
a18d97c897
|
@ -445,6 +445,11 @@
|
||||||
onpopupshowing="event.stopPropagation(); updateRecentWindows(this);"
|
onpopupshowing="event.stopPropagation(); updateRecentWindows(this);"
|
||||||
oncommand="undoCloseWindow(event.target.value);"/>
|
oncommand="undoCloseWindow(event.target.value);"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menuitem id="historyRestoreLastSession"
|
||||||
|
label="&historyRestoreLastSession.label;"
|
||||||
|
accesskey="&historyRestoreLastSession.accesskey;"
|
||||||
|
oncommand="restoreLastSession();"
|
||||||
|
disabled="true"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem id="menu_showAllHistory"
|
<menuitem id="menu_showAllHistory"
|
||||||
label="&historyCmd.label;"
|
label="&historyCmd.label;"
|
||||||
|
@ -453,11 +458,6 @@
|
||||||
key="key_gotoHistory"/>
|
key="key_gotoHistory"/>
|
||||||
<menuseparator id="startHistorySeparator" hidden="true"/>
|
<menuseparator id="startHistorySeparator" hidden="true"/>
|
||||||
<menuseparator id="endHistorySeparator" hidden="true"/>
|
<menuseparator id="endHistorySeparator" hidden="true"/>
|
||||||
<menuitem id="historyRestoreLastSession"
|
|
||||||
label="&historyRestoreLastSession.label;"
|
|
||||||
accesskey="&historyRestoreLastSession.accesskey;"
|
|
||||||
oncommand="restoreLastSession();"
|
|
||||||
disabled="true"/>
|
|
||||||
<menuitem id="sync-tabs-menuitem"
|
<menuitem id="sync-tabs-menuitem"
|
||||||
label="&syncTabsMenu.label;"
|
label="&syncTabsMenu.label;"
|
||||||
oncommand="BrowserOpenSyncTabs();"
|
oncommand="BrowserOpenSyncTabs();"
|
||||||
|
|
|
@ -100,8 +100,8 @@ function FillHistoryMenu(aParent, aMenu)
|
||||||
case "go":
|
case "go":
|
||||||
var startHistory = document.getElementById("startHistorySeparator");
|
var startHistory = document.getElementById("startHistorySeparator");
|
||||||
var endHistory = document.getElementById("endHistorySeparator");
|
var endHistory = document.getElementById("endHistorySeparator");
|
||||||
|
var syncMenuItem = document.getElementById("sync-tabs-menuitem");
|
||||||
startHistory.hidden = (count == 0);
|
startHistory.hidden = (count == 0);
|
||||||
endHistory.hidden = (endHistory == aParent.lastChild);
|
|
||||||
end = count > MAX_HISTORY_MENU_ITEMS ? count - MAX_HISTORY_MENU_ITEMS : 0;
|
end = count > MAX_HISTORY_MENU_ITEMS ? count - MAX_HISTORY_MENU_ITEMS : 0;
|
||||||
for (j = count - 1; j >= end; j--)
|
for (j = count - 1; j >= end; j--)
|
||||||
{
|
{
|
||||||
|
@ -110,6 +110,7 @@ function FillHistoryMenu(aParent, aMenu)
|
||||||
createRadioMenuItem(aParent, endHistory, j, entry.title, j == index);
|
createRadioMenuItem(aParent, endHistory, j, entry.title, j == index);
|
||||||
}
|
}
|
||||||
toggleTabsFromOtherComputers();
|
toggleTabsFromOtherComputers();
|
||||||
|
endHistory.hidden = (endHistory == aParent.lastChild || syncMenuItem.hidden);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче