From d9241280eca7b23ad321cdffc657494e760f965f Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Tue, 7 Jun 2005 23:19:05 +0000 Subject: [PATCH] Bug 202729 Allow disabling of non-ASCII-named filters r=jshin sr=bienvenu a=asa --- .../search/resources/content/FilterListDialog.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mailnews/base/search/resources/content/FilterListDialog.js b/mailnews/base/search/resources/content/FilterListDialog.js index 4dc129b2544..7610d0f0fa6 100644 --- a/mailnews/base/search/resources/content/FilterListDialog.js +++ b/mailnews/base/search/resources/content/FilterListDialog.js @@ -235,11 +235,10 @@ function setServer(uri) gCurrentServerURI = uri; } -function toggleFilter(aFilterURI) +function toggleFilter(aResource) { - var filterResource = gRDF.GetResource(aFilterURI); - var filter = filterResource.GetDelegate("filter", - Components.interfaces.nsIMsgFilter); + var filter = aResource.GetDelegate("filter", + Components.interfaces.nsIMsgFilter); if (filter.unparseable) { if (gPromptService) @@ -605,8 +604,7 @@ function onFilterClick(event) } if (col.value.id == "activeColumn") { - var res = filterTree.builderView.getResourceAtIndex(row.value); - toggleFilter(res.Value); + toggleFilter(filterTree.builderView.getResourceAtIndex(row.value)); } } @@ -641,8 +639,7 @@ function onFilterTreeKeyPress(event) var start = {}, end = {}; gFilterTree.view.selection.getRangeAt(i, start, end); for (var k = start.value; k <= end.value; ++k) { - var res = gFilterTree.builderView.getResourceAtIndex(k); - toggleFilter(res.Value); + toggleFilter(gFilterTree.builderView.getResourceAtIndex(k)); } } }