context: function onOK(){  var name = gDialog.nameField.value;  var uri = gDialog.picker.getAttribute("uri");  var messengerBundle = document.getElementById("bundle_messenger");  var searchOnline = document.getElementById('searchOnline').checked;  if (!gSearchFolderURIs)  {      window.alert(messengerBundle.getString('alertNoSearchFoldersSelected'));    return false;  }  if (window.arguments[0].editExistingFolder)  {    // update the search terms     saveSearchTerms(gSearchTermSession.searchTerms, gSearchTermSession);    var searchTermString = getSearchTermString(gSearchTermSession.searchTerms);         var msgFolder = GetMsgFolderFromUri(window.arguments[0].preselectedURI);    var msgDatabase = msgFolder.getMsgDatabase(msgWindow);    var dbFolderInfo = msgDatabase.dBFolderInfo;    // set the view string as a property of the db folder info    // set the original folder name as well.    dbFolderInfo.setCharPtrProperty("searchStr", searchTermString);    dbFolderInfo.setCharPtrProperty("searchFolderUri", gSearchFolderURIs);    dbFolderInfo.setBooleanProperty("searchOnline", searchOnline);        msgDatabase.Close(true);    var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);    accountManager.saveVirtualFolders();    if (window.arguments[0].onOKCallback)      window.arguments[0].onOKCallback(msgFolder.URI);        }   else if (name && uri) // create a new virtual folder  {        // check to see if we already have a folder with the same name and alert the user if so...    var parentFolder = GetMsgFolderFromUri(uri);    if (parentFolder.containsChildNamed(name))    {      window.alert(messengerBundle.getString('folderExists'));      return false;          }    // XXX: Add code to make sure a folder with this name does not already exist before creating the virtual folder...    // Alert the user here if that is the case.    saveSearchTerms(gSearchTermSession.searchTerms, gSearchTermSession);    CreateVirtualFolder(name, parentFolder, gSearchFolderURIs, gSearchTermSession.searchTerms, searchOnline);  }  return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/0c3e75f9269436ce8074f0e484e530cfc7260c6f/virtualFolderProperties.js/buggy/mailnews/base/resources/content/virtualFolderProperties.js