add: else {   SetFolderPicker(kJunkOnLocalFolderURI, "actionTargetFolder"); } 
context: function setupForAccountFromFolder(aURI){  try {    if (!aURI)      throw "this can happen if no folder is selected in the folder pane"    var msgFolder = GetMsgFolderFromUri(aURI, false);    gCurrentServer = msgFolder.server;    var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + gCurrentServer.type];    protocolInfo = protocolInfo.getService(Components.interfaces.nsIMsgProtocolInfo);    if (!protocolInfo.canGetIncomingMessages)      throw "this can happen if the selected folder (or account) doesn't have junk controls (like news or local folder)"  }  catch (ex) {    // get server for default account    // XXX TODO    // edge cases to worry about later:    // what if there is no default account?     // what if default account is of a type where canGetIncomingMessages == true?    // what if no accounts are of a type where canGetIncomingMessages == true?    var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]               .getService(Components.interfaces.nsIMsgAccountManager);    var account = accountManager.defaultAccount;    gCurrentServer = account.incomingServer;  }  var obj;  var key = gCurrentServer.key;  if (key in gSpamSettings) {    obj = gSpamSettings[key];  }  else {    // get and clone spam settings for this server    // we clone because if the users cancels we are going to throw away the changes    var settings = Components.classes["@mozilla.org/messenger/spamsettings;1"].createInstance(Components.interfaces.nsISpamSettings);    settings.clone(gCurrentServer.spamSettings);    obj = {server: gCurrentServer, settings: settings};     gSpamSettings[key] = obj;  }   // select server in the menulist  var serverList = document.getElementById("server");  var menuitems = serverList.getElementsByAttribute("id", obj.server.serverURI);  serverList.selectedItem = menuitems[0];  // set up the UI for this server  // set up the level checkbox  document.getElementById("level").checked = (obj.settings.level > 0);  // set up the junk mail folder picker  document.getElementById("moveOnSpam").checked = obj.settings.moveOnSpam;  document.getElementById("moveTargetMode").selectedItem = document.getElementById("moveTargetMode" + obj.settings.moveTargetMode);  // the default account should be the current account  // unless you can't create a folder on that server  // or search on that account (for purge)  // in which case, use Local Folders  var defaultAccountURI = obj.server.canCreateFoldersOnServer && obj.server.canSearchMessages ? obj.server.serverURI : "mailbox://nobody@Local%20Folders";  // if there is a target account, use it else use the default account  SetFolderPicker(obj.settings.actionTargetAccount ? obj.settings.actionTargetAccount : defaultAccountURI, "actionTargetAccount");    if (obj.settings.actionTargetFolder)    SetFolderPicker(obj.settings.actionTargetFolder, "actionTargetFolder");  // set up the purge UI  document.getElementById("purge").checked = obj.settings.purge;  document.getElementById("purgeInterval").value = obj.settings.purgeInterval;  // set up the whitelist UI  document.getElementById("useWhiteList").checked = obj.settings.useWhiteList;  var abList = document.getElementById("whiteListAbURI");  menuitems = abList.getElementsByAttribute("id", obj.settings.whiteListAbURI);  abList.selectedItem = menuitems[0];  conditionallyEnableUI(null);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c07a030f4c3c4edf405b0234b8baf2515743d3a1/junkMail.js/buggy/mailnews/base/resources/content/junkMail.js