* src/GenericFilter.py (Rule,GenericFilter): New methods prepare() and

reset(), that are called before/after a filter is applied, to properly
support query caches; (IsWitness): new filter;
(RelationshipPathBetween,IsDescendantOf,IsLessThanNthGenerationDescendantOf,
IsMoreThanNthGenerationDescendantOf,IsChildOfFilterMatch,IsSiblingOfFilterMatch,
IsAncestorOf,IsAncestorOfFilterMatch,IsLessThanNthGenerationAncestorOf,
IsMoreThanNthGenerationAncestorOf,IsParentOfFilterMatch,HasCommonAncestorWith):
use prepare() and reset() to create a proper query cache. Currently the
cache was only created once after object creation and never updated.
* src/gramps_main.py: Add new filters to the menu.


svn: r4171
This commit is contained in:
Martin Hawlisch
2005-03-13 19:49:38 +00:00
parent 5b1675d0dc
commit 9130c8819e
3 changed files with 206 additions and 146 deletions

View File

@@ -942,6 +942,11 @@ class Gramps:
all.add_rule(GenericFilter.PeoplePrivate([]))
filter_list.append(all)
all = GenericFilter.GenericFilter()
all.set_name(_("Witnesses"))
all.add_rule(GenericFilter.IsWitness([]))
filter_list.append(all)
self.filter_model = GenericFilter.FilterStore(filter_list)
self.filter_list.set_model(self.filter_model)
self.filter_list.set_active(self.filter_model.default_index())