rem: gFilter.appendTerm(term); 
add:   var filterAction = gFilter.createAction(); filterAction.type = (getScopeFromFilterList(gFilterList) == Components.interfaces.nsMsgSearchScope.newsFilter) ? nsMsgFilterAction.Delete : nsMsgFilterAction.MoveToFolder; gFilter.appendAction(filterAction); initializeDialog(gFilter);  gFilter.clearActionList(); } else {  onMore(null); } } } 
context: function filterEditorOnLoad(){    initializeSearchWidgets();    initializeFilterWidgets();    gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);    gFilterBundle = document.getElementById("bundle_filter");    InitMessageLabel();    if ("arguments" in window && window.arguments[0]) {        var args = window.arguments[0];        if ("filterList" in args) {          gFilterList = args.filterList;        }        if ("filter" in args) {          // editing a filter          gFilter = window.arguments[0].filter;          initializeDialog(gFilter);          PopulateTemplateMenu();        }         else {          if (gFilterList)              setSearchScope(getScopeFromFilterList(gFilterList));          PopulateTemplateMenu();          // if doing prefill filter create a new filter and populate it.          if ("filterName" in args) {            gPreFillName = args.filterName;            gFilter = gFilterList.createFilter(gPreFillName);            var term = gFilter.createTerm();            term.attrib = Components.interfaces.nsMsgSearchAttrib.Sender;            term.op = Components.interfaces.nsMsgSearchOp.Is;            var termValue = term.value;            termValue.attrib = term.attrib;            termValue.str = gPreFillName;            term.value = termValue;            gFilter.appendTerm(term);            // the default action for news filters is Delete            // for everything else, it's MoveToFolder            var filterAction = gFilter.createAction();            filterAction.type = (getScopeFromFilterList(gFilterList) == Components.interfaces.nsMsgSearchScope.newsFilter) ? nsMsgFilterAction.Delete : nsMsgFilterAction.MoveToFolder;            gFilter.appendAction(filterAction);            initializeDialog(gFilter);            // Clear the default action added above now that the dialog is initialized.            gFilter.clearActionList();          }          else{            // fake the first more button press            onMore(null);          }        }    }    if (!gFilter)    {      var stub = gFilterBundle.getString("untitledFilterName");      var count = 1;      var name = stub;      // Set the default filter name to be "Untitled Filter"      while (duplicateFilterNameExists(name))       {        count++;        name = stub + " " + count.toString();      }      gFilterNameElement.value = name;      SetUpFilterActionList(getScopeFromFilterList(gFilterList));    }    gFilterNameElement.select();    // This call is required on mac and linux.  It has no effect    // under win32.  See bug 94800.    gFilterNameElement.focus();    moveToAlertPosition();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4a95f3d489151db27fe9745922f9dd0ca4177049/FilterEditor.js/clean/mailnews/base/search/resources/content/FilterEditor.js