From 1d62180e4902ec0a7733f88d3af1eb34a3827633 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Mon, 7 Jan 2008 04:13:16 +0000 Subject: [PATCH] 0001521: Filters work when tested, but not in side bar svn: r9737 --- ChangeLog | 4 ++++ src/Filters/_SearchFilter.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50477d1a5..7bd411669 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-06 Brian Matherly + * src/Filters/_SearchFilter.py: + 0001521: Filters work when tested, but not in side bar + 2008-01-06 Douglas S. Blank * src/plugins/DefaultGramplets.py: added gettext (thanks, Jim!) diff --git a/src/Filters/_SearchFilter.py b/src/Filters/_SearchFilter.py index 510e1bb5e..ce64ad056 100644 --- a/src/Filters/_SearchFilter.py +++ b/src/Filters/_SearchFilter.py @@ -30,13 +30,13 @@ class SearchFilter: self.text = text.upper() self.invert = invert - def match(self, handle): + def match(self, handle, db): return self.invert ^ (self.func(handle).upper().find(self.text) != -1) class ExactSearchFilter(SearchFilter): def __init__(self, func, text, invert): SearchFilter.__init__(self, func, text, invert) - def match(self, handle): + def match(self, handle, db): return self.invert ^ (self.func(handle).upper() == self.text.strip())