зеркало из https://github.com/mozilla/gecko-dev.git
add support for pages asking to be reloaded from scratch
(so that SMTP prefs can be reloaded) r=sspitzer
This commit is contained in:
Родитель
7dbf74f652
Коммит
7b171e786c
|
@ -377,11 +377,19 @@ function showPage(serverId, pageId) {
|
|||
// page has loaded
|
||||
function onPanelLoaded(pageId) {
|
||||
if (pageId != pendingPageId) {
|
||||
dump("ERROR: page " + pageId + " was loaded, but " + pendingPageId + " was expected!\n");
|
||||
return;
|
||||
|
||||
// if we're reloading the current page, we'll assume the
|
||||
// page has asked itself to be completely reloaded from
|
||||
// the prefs. to do this, clear out the the old entry in
|
||||
// the account data, and then restore theh page
|
||||
if (pageId == currentPageId) {
|
||||
clearAccountData(currentServerId, currentPageId);
|
||||
restorePage(currentServerId, currentPageId);
|
||||
}
|
||||
} else {
|
||||
|
||||
restorePage(pendingPageId, pendingServerId);
|
||||
}
|
||||
|
||||
restorePage(pendingPageId, pendingServerId);
|
||||
|
||||
// probably unnecessary, but useful for debugging
|
||||
pendingServerId = null;
|
||||
|
@ -641,6 +649,11 @@ function getValueArrayFor(serverId) {
|
|||
return accountArray[serverId];
|
||||
}
|
||||
|
||||
function clearAccountData(serverId, pageId)
|
||||
{
|
||||
getValueArrayFor(serverId)[pageId] = null;
|
||||
}
|
||||
|
||||
function getServerIdAndPageIdFromTree(tree)
|
||||
{
|
||||
var serverId = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче