add: var searchSubfolders = document.getElementById("checkSearchSubFolders").checked; if (searchSubfolders && gCurrentFolder && gCurrentFolder.hasSubFolders) { var subFolderEnumerator = gCurrentFolder.GetSubFolders(); var done = false; while (!done) { var next = subFolderEnumerator.currentItem(); if (next) { var nextFolder = next.QueryInterface(Components.interfaces.nsIMsgFolder); if (nextFolder) gSearchSession.addScopeTerm(GetScopeForFolder(nextFolder), nextFolder); } try { subFolderEnumerator.next(); } catch (ex) { done = true; } } } 
context: function onSearch(event){    dump("setting up search..\n");    gSearchSession.clearScopes();    // tell the search session what the new scope is    gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder),                                gCurrentFolder);    // reflect the search widgets back into the search session    saveSearchTerms(gSearchSession.searchTerms, gSearchSession);    gSearchSession.search(msgWindow);    // refresh the tree after the search starts, because initiating the    // search will cause the datasource to clear itself    gThreadTree.setAttribute("ref", gThreadTree.getAttribute("ref"));    dump("Kicking it off with " + gThreadTree.getAttribute("ref") + "\n");}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/4fcdd3225a07536d56f29f2aabaedb0a68042404/SearchDialog.js/clean/mailnews/base/search/resources/content/SearchDialog.js