From 5974a4864bc8e2d7ea01aa2fd3e374d06f57fb10 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 22 Aug 2006 05:05:07 +0000 Subject: [PATCH] * src/plugins/EventCmp.py (__init__): Add custom filters. svn: r7230 --- gramps2/ChangeLog | 1 + gramps2/src/plugins/EventCmp.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 67b2c898b..98bc91f1a 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2006-08-21 Alex Roitman + * src/plugins/EventCmp.py (__init__): Add custom filters. * src/plugins/ChangeTypes.py (on_apply_clicked): Remove extra unicode conversion. * src/plugins/Checkpoint.py (__init__): Assign dbstate. diff --git a/gramps2/src/plugins/EventCmp.py b/gramps2/src/plugins/EventCmp.py index 3253549be..1baef4fc9 100644 --- a/gramps2/src/plugins/EventCmp.py +++ b/gramps2/src/plugins/EventCmp.py @@ -43,7 +43,7 @@ import gtk.glade # GRAMPS modules # #------------------------------------------------------------------------ -from Filters import GenericFilter, build_filter_menu, Rules +from Filters import GenericFilter, build_filter_menu, Rules, CustomFilters import ListModel import Sort import Utils @@ -157,11 +157,14 @@ class EventComparison(Tool.Tool,ManagedWindow.ManagedWindow): self.set_window(window,self.filterDialog.get_widget('title'), self.label) - self.all = GenericFilter() - self.all.set_name(_("Entire Database")) - self.all.add_rule(Rules.Person.Everyone([])) + all = GenericFilter() + all.set_name(_("Entire Database")) + all.add_rule(Rules.Person.Everyone([])) - self.filter_menu = build_filter_menu([self.all]) + the_filters = [all] + the_filters.extend(CustomFilters.get_filters('Person')) + + self.filter_menu = build_filter_menu(the_filters) filter_num = self.options.handler.get_filter_number() self.filter_menu.set_active(filter_num) self.filter_menu.show()