rem: var filterSelected = gFilterTree.view.selection.count > 0; editButton.disabled = !filterSelected; deleteButton.disabled = !filterSelected; reorderUpButton.disabled = !(filterSelected && gFilterTree.currentIndex > 0); reorderDownButton.disabled = !(filterSelected && gFilterTree.currentIndex < gFilterTree.view.rowCount-1); 
add: var numFiltersSelected = gFilterTree.view.selection.count; var oneFilterSelected = (numFiltersSelected == 1);   editButton.disabled = !oneFilterSelected; deleteButton.disabled = !oneFilterSelected;    runFiltersButton.disabled = !numFiltersSelected; runFiltersFolderPickerLabel.disabled = !numFiltersSelected; runFiltersFolderPicker.disabled = !numFiltersSelected;   reorderUpButton.disabled = !(oneFilterSelected && gFilterTree.currentIndex > 0);  reorderDownButton.disabled = !(oneFilterSelected && gFilterTree.currentIndex < gFilterTree.view.rowCount-1); 
context: function updateButtons(){    var filterSelected = gFilterTree.view.selection.count > 0;    editButton.disabled = !filterSelected;    deleteButton.disabled = !filterSelected;    reorderUpButton.disabled = !(filterSelected && gFilterTree.currentIndex > 0);    reorderDownButton.disabled = !(filterSelected && gFilterTree.currentIndex < gFilterTree.view.rowCount-1);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f8e75f99a3d434a59edeab31a4436cf5cddf65df/FilterListDialog.js/clean/mailnews/base/search/resources/content/FilterListDialog.js