зеркало из https://github.com/mozilla/gecko-dev.git
fix for 58506;smtp panel doesnt get refreshed in account wizard;r=srilatha;sr=mscott
This commit is contained in:
Родитель
8236aafeec
Коммит
610734782f
|
@ -332,6 +332,30 @@ function onAddAccount() {
|
|||
MsgAccountWizard();
|
||||
}
|
||||
|
||||
function ReloadSmtpPanel()
|
||||
{
|
||||
var smtpUsername = top.frames["contentFrame"].document.getElementById("smtp.username");
|
||||
var smtpHostname = top.frames["contentFrame"].document.getElementById("smtp.hostname");
|
||||
var smtpPort = top.frames["contentFrame"].document.getElementById("smtp.port");
|
||||
var smtpUseUsername = top.frames["contentFrame"].document.getElementById("smtp.useUsername");
|
||||
var smtpAuthMethod = top.frames["contentFrame"].document.getElementById("smtp.authMethod");
|
||||
var smtpTrySSL = top.frames["contentFrame"].document.getElementById("smtp.trySSL");
|
||||
|
||||
var defaultServer = smtpService.defaultServer;
|
||||
|
||||
smtpUsername.value = defaultServer.username;
|
||||
smtpHostname.value = defaultServer.hostname;
|
||||
smtpPort.value = defaultServer.port ? defaultServer.port : "";
|
||||
smtpAuthMethod.setAttribute("value", defaultServer.authMethod);
|
||||
if (smtpAuthMethod.getAttribute("value") == "1")
|
||||
smtpUseUsername.checked = true;
|
||||
var elements = smtpTrySSL.getElementsByAttribute("value", defaultServer.trySSL);
|
||||
if (elements.length == 0)
|
||||
elements = smtpTrySSL.getElementsByAttribute("value", "1");
|
||||
smtpTrySSL.selectedItem = elements[0];
|
||||
}
|
||||
|
||||
|
||||
function onDuplicateAccount() {
|
||||
//dump("onDuplicateAccount\n");
|
||||
|
||||
|
|
|
@ -196,6 +196,11 @@ function msgOpenAccountWizard()
|
|||
window.openDialog("chrome://messenger/content/AccountWizard.xul",
|
||||
"AccountWizard", "chrome,modal,titlebar,resizable");
|
||||
|
||||
//For the first account we need to reset the default smtp server in the panel.
|
||||
var smtpService = Components.classes["@mozilla.org/messengercompose/smtp;1"].getService(Components.interfaces.nsISmtpService);
|
||||
var serverCount = smtpService.smtpServers.Count();
|
||||
if(serverCount == 1)
|
||||
ReloadSmtpPanel();
|
||||
}
|
||||
|
||||
// selectPage: the xul file name for the viewing page,
|
||||
|
|
Загрузка…
Ссылка в новой задаче