0001521: Filters work when tested, but not in side bar

svn: r9737
This commit is contained in:
Brian Matherly 2008-01-07 04:13:16 +00:00
parent 2fbee469a7
commit 1d62180e49
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2008-01-06 Brian Matherly <brian@gramps-project.org>
* src/Filters/_SearchFilter.py:
0001521: Filters work when tested, but not in side bar
2008-01-06 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/DefaultGramplets.py: added gettext (thanks, Jim!)

View File

@ -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())