From cfeaf5035ac01969574f6cba761f3e8b41d961e1 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 8 Oct 2006 02:05:17 +0000 Subject: [PATCH] * src/GrampsDb/_WriteGedcom.py (GedcomWriterOptionBox.get_option_box): Add custom filters to the filter list. svn: r7365 --- gramps2/ChangeLog | 3 +++ gramps2/src/GrampsDb/_WriteGedcom.py | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 6e97d19f1..d076287d2 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,7 @@ 2006-10-07 Alex Roitman + * src/GrampsDb/_WriteGedcom.py + (GedcomWriterOptionBox.get_option_box): Add custom filters to the + filter list. * data/grampsxml.dtd: Update DTD for XML 1.1.3. * data/grampsxml.rng: Update schema for XML 1.1.3. * src/GrampsDb/_ReadXML.py (stop_county): Read county. diff --git a/gramps2/src/GrampsDb/_WriteGedcom.py b/gramps2/src/GrampsDb/_WriteGedcom.py index 982695e5a..df800e269 100644 --- a/gramps2/src/GrampsDb/_WriteGedcom.py +++ b/gramps2/src/GrampsDb/_WriteGedcom.py @@ -293,6 +293,8 @@ class GedcomWriterOptionBox: all.set_name(_("Entire Database")) all.add_rule(Rules.Person.Everyone([])) + the_filters = [all] + if self.person: des = GenericFilter() des.set_name(_("Descendants of %s") % @@ -312,9 +314,11 @@ class GedcomWriterOptionBox: com.add_rule(Rules.Person.HasCommonAncestorWith( [self.person.get_gramps_id()])) - self.filter_menu = build_filter_menu([all,des,ans,com]) - else: - self.filter_menu = build_filter_menu([all]) + the_filters += [des,ans,com] + + from Filters import CustomFilters + the_filters.extend(CustomFilters.get_filters('Person')) + self.filter_menu = build_filter_menu(the_filters) filter_obj.set_menu(self.filter_menu) gedmap = GedcomInfo.GedcomInfoDB()