Just a minor cleanup. No functional change.

* src/ExportOptions.py


svn: r11489
This commit is contained in:
Kees Bakker 2008-12-17 21:39:37 +00:00
parent 60aa458d87
commit 2e0351e504

View File

@ -142,29 +142,25 @@ class WriterOptionBox:
def __define_person_filters(self): def __define_person_filters(self):
"""Add person filters if the active person is defined.""" """Add person filters if the active person is defined."""
name = name_displayer.display(self.person)
gramps_id = self.person.get_gramps_id()
des = GenericFilter() des = GenericFilter()
des.set_name(_("Descendants of %s") % des.set_name(_("Descendants of %s") % name)
name_displayer.display(self.person)) des.add_rule(Rules.Person.IsDescendantOf([gramps_id, 1]))
des.add_rule(Rules.Person.IsDescendantOf(
[self.person.get_gramps_id(), 1]))
df = GenericFilter() df = GenericFilter()
df.set_name(_("Descendant Families of %s") % df.set_name(_("Descendant Families of %s") % name)
name_displayer.display(self.person)) df.add_rule(Rules.Person.IsDescendantFamilyOf([gramps_id, 1]))
df.add_rule(Rules.Person.IsDescendantFamilyOf(
[self.person.get_gramps_id(), 1]))
ans = GenericFilter() ans = GenericFilter()
ans.set_name(_("Ancestors of %s") ans.set_name(_("Ancestors of %s") % name)
% name_displayer.display(self.person)) ans.add_rule(Rules.Person.IsAncestorOf([gramps_id, 1]))
ans.add_rule(Rules.Person.IsAncestorOf(
[self.person.get_gramps_id(), 1]))
com = GenericFilter() com = GenericFilter()
com.set_name(_("People with common ancestor with %s") % com.set_name(_("People with common ancestor with %s") % name)
name_displayer.display(self.person)) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id]))
com.add_rule(Rules.Person.HasCommonAncestorWith(
[self.person.get_gramps_id()]))
return [des, df, ans, com] return [des, df, ans, com]
def parse_options(self): def parse_options(self):