diff --git a/mailnews/base/prefs/resources/content/smtpEditOverlay.js b/mailnews/base/prefs/resources/content/smtpEditOverlay.js index c7e9248e67fa..09d89ef5ef0b 100644 --- a/mailnews/base/prefs/resources/content/smtpEditOverlay.js +++ b/mailnews/base/prefs/resources/content/smtpEditOverlay.js @@ -86,7 +86,6 @@ function initSmtpSettings(server) { //dump("gSmtpAuthMethod.value = " + gSmtpAuthMethod.getAttribute("value") + "\n"); onUseUsername(gSmtpUseUsername, false); - updateControls(); selectProtocol(1); if (gSmtpService.defaultServer) onLockPreference(); @@ -100,13 +99,13 @@ function onLockPreference() var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); - var allPrefElements = [ - { prefstring:"hostname", id:"smtp.hostname"}, - { prefstring:"description", id:"smtp.description"}, - { prefstring:"port", id:"smtp.port"}, - { prefstring:"use_username", id:"smtp.useUsername"}, - { prefstring:"try_ssl", id:"smtp.trySSL"} - ]; + var allPrefElements = { + hostname: gSmtpHostname, + description: gSmtpDescription, + port: gSmtpPort, + use_username: gSmtpUseUsername, + try_ssl: gSmtpTrySSL + }; gSmtpPrefBranch = prefService.getBranch(finalPrefString); disableIfLocked( allPrefElements ); @@ -117,21 +116,9 @@ function onLockPreference() // stomping on the disabled state indiscriminately. function disableIfLocked( prefstrArray ) { - for (var i=0; i