add: if (gDeleteFromServerCheckbox.checked) { filterAction = gFilter.createAction(); filterAction.type = nsMsgFilterAction.DeleteFromPop3Server; gFilter.appendAction(filterAction); }  
context: function saveFilter() {  var isNewFilter;  var str;  var filterAction;   var filterName= gFilterNameElement.value;  if (!filterName || filterName == "")   {    str = gFilterBundle.getString("mustEnterName");    window.alert(str);    gFilterNameElement.focus();    return false;  }  if (!gFilter)   {    gFilter = gFilterList.createFilter(gFilterNameElement.value);    isNewFilter = true;    gFilter.enabled=true;  }   else   {    gFilter.filterName = gFilterNameElement.value;    //Prefilter is treated as a new filter.    if (gPreFillName)     {      isNewFilter = true;      gFilter.enabled=true;    }    else     {      isNewFilter = false;      gFilter.clearActionList();    }  }  if (gMoveToFolderCheckbox.checked)  {    if (gActionTargetElement)      targetUri = gActionTargetElement.getAttribute("uri");    if (!targetUri || targetUri == "")     {      str = gFilterBundle.getString("mustSelectFolder");      window.alert(str);      return false;    }          filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.MoveToFolder;    filterAction.targetFolderUri = targetUri;    gFilter.appendAction(filterAction);  }      if (gChangePriorityCheckbox.checked)    {    if (!gActionPriority.selectedItem)     {      str = gFilterBundle.getString("mustSelectPriority");      window.alert(str);      return false;    }    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.ChangePriority;    filterAction.priority = gActionPriority.selectedItem.getAttribute("value");    gFilter.appendAction(filterAction);  }  if (gLabelCheckbox.checked)   {    if (!gActionLabel.selectedItem)     {      str = gFilterBundle.getString("mustSelectLabel");      window.alert(str);      return false;    }    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.Label;    filterAction.label = gActionLabel.selectedItem.getAttribute("value");    gFilter.appendAction(filterAction);  }  if (gMarkReadCheckbox.checked)   {    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.MarkRead;    gFilter.appendAction(filterAction);  }  if (gMarkFlaggedCheckbox.checked)   {    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.MarkFlagged;    gFilter.appendAction(filterAction);  }  if (gDeleteCheckbox.checked)   {    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.Delete;    gFilter.appendAction(filterAction);  }  if (gWatchCheckbox.checked)   {    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.WatchThread;    gFilter.appendAction(filterAction);  }    if (gKillCheckbox.checked)   {    filterAction = gFilter.createAction();    filterAction.type = nsMsgFilterAction.KillThread;    gFilter.appendAction(filterAction);  }  if (gFilter.actionList.Count() <= 0)  {    str = gFilterBundle.getString("mustSelectAction");    window.alert(str);    // reset gFilter so that filter is still saved next time around    // see bug #186217    gFilter = null;    return false;  }  if (getScope(gFilter) == Components.interfaces.nsMsgSearchScope.newsFilter)    gFilter.filterType = Components.interfaces.nsMsgFilterType.NewsRule;  else    gFilter.filterType = Components.interfaces.nsMsgFilterType.InboxRule;  saveSearchTerms(gFilter.searchTerms, gFilter);  if (isNewFilter)   {    // new filter - insert into gFilterList    gFilterList.insertFilterAt(0, gFilter);  }  // success!  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5fc50473f495adcc439f6145995e78a0a93b07b2/FilterEditor.js/clean/mailnews/base/search/resources/content/FilterEditor.js