* src/GrampsDb/_WriteGedcom.py

(GedcomWriterOptionBox.get_option_box): Add custom filters to the
	filter list.


svn: r7365
This commit is contained in:
Alex Roitman 2006-10-08 02:05:17 +00:00
parent dd70d63539
commit 356d15ac7a
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,7 @@
2006-10-07 Alex Roitman <shura@gramps-project.org> 2006-10-07 Alex Roitman <shura@gramps-project.org>
* 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.dtd: Update DTD for XML 1.1.3.
* data/grampsxml.rng: Update schema for XML 1.1.3. * data/grampsxml.rng: Update schema for XML 1.1.3.
* src/GrampsDb/_ReadXML.py (stop_county): Read county. * src/GrampsDb/_ReadXML.py (stop_county): Read county.

View File

@ -293,6 +293,8 @@ class GedcomWriterOptionBox:
all.set_name(_("Entire Database")) all.set_name(_("Entire Database"))
all.add_rule(Rules.Person.Everyone([])) all.add_rule(Rules.Person.Everyone([]))
the_filters = [all]
if self.person: if self.person:
des = GenericFilter() des = GenericFilter()
des.set_name(_("Descendants of %s") % des.set_name(_("Descendants of %s") %
@ -312,9 +314,11 @@ class GedcomWriterOptionBox:
com.add_rule(Rules.Person.HasCommonAncestorWith( com.add_rule(Rules.Person.HasCommonAncestorWith(
[self.person.get_gramps_id()])) [self.person.get_gramps_id()]))
self.filter_menu = build_filter_menu([all,des,ans,com]) the_filters += [des,ans,com]
else:
self.filter_menu = build_filter_menu([all]) 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) filter_obj.set_menu(self.filter_menu)
gedmap = GedcomInfo.GedcomInfoDB() gedmap = GedcomInfo.GedcomInfoDB()