add:    if (nsPrefBranch.prefIsLocked(newAccountButton.getAttribute("prefstring"))) canCreate = false;   if (nsPrefBranch.prefIsLocked(setDefaultButton.getAttribute("prefstring"))) canSetDefault = false; if (nsPrefBranch.prefIsLocked(deleteButton.getAttribute("prefstring"))) canDelete = false;  setEnabled(newAccountButton, canCreate); 
context: function updateButtons(tree,serverId) {  var canDuplicate = true;  var canDelete = true;  var canSetDefault = true;  //dump("updateButtons\n");  //dump("serverId = " + serverId + "\n");  var account = getAccountFromServerId(serverId);  //dump("account = " + account + "\n");  if (account) {  var server = account.incomingServer;  var type = server.type;    if (account.identities.Count() < 1)      canSetDefault = false;  //dump("servertype = " + type + "\n");  var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + type].getService(Components.interfaces.nsIMsgProtocolInfo);    canDuplicate = protocolinfo.canDuplicate;    canDelete = protocolinfo.canDelete;    if (!canDelete) {      canDelete = server.canDelete;    }  }  else {  // HACK  // if account is null, we have either selected a SMTP server, or there is a problem  // either way, we don't want the user to be able to delete it or duplicate it    canSetDefault = false;  canDelete = false;  canDuplicate = false;  }  if (tree.selectedItems.length < 1)    canDuplicate = canSetDefault = canDelete = false;  setEnabled(duplicateButton, canDuplicate);  setEnabled(setDefaultButton, canSetDefault);  setEnabled(deleteButton, canDelete);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4908a3ccdc3d63b456643d07405cd5bdb98600be/AccountManager.js/clean/mailnews/base/prefs/resources/content/AccountManager.js