* src/plugins/WriteGeneweb.py (GeneWebWriterOptionBox.get_option_box):
Build person-centered filters only if a person is selected. * src/plugins/WriteFtree.py (FtreeWriterOptionBox.get_option_box): Build person-centered filters only if a person is selected. svn: r4826
This commit is contained in:
parent
dfc376c640
commit
3ac758f702
@ -1,6 +1,10 @@
|
|||||||
2005-06-15 Alex Roitman <shura@gramps-project.org>
|
2005-06-15 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/WriteGedcom.py (GedcomWriterOptionBox.get_option_box):
|
* src/WriteGedcom.py (GedcomWriterOptionBox.get_option_box):
|
||||||
Build person-centered filters only if a person is selected.
|
Build person-centered filters only if a person is selected.
|
||||||
|
* src/plugins/WriteGeneweb.py (GeneWebWriterOptionBox.get_option_box):
|
||||||
|
Build person-centered filters only if a person is selected.
|
||||||
|
* src/plugins/WriteFtree.py (FtreeWriterOptionBox.get_option_box):
|
||||||
|
Build person-centered filters only if a person is selected.
|
||||||
|
|
||||||
2005-06-15 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-06-15 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/po/de.po: Applied patch from Jens Seidel <jensseidel@users.sf.net>
|
* src/po/de.po: Applied patch from Jens Seidel <jensseidel@users.sf.net>
|
||||||
|
@ -86,20 +86,23 @@ class FtreeWriterOptionBox:
|
|||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
all.add_rule(GenericFilter.Everyone([]))
|
all.add_rule(GenericFilter.Everyone([]))
|
||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
if self.person:
|
||||||
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
des = GenericFilter.GenericFilter()
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
||||||
|
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") %
|
com.set_name(_("People with common ancestor with %s") %
|
||||||
self.person.get_primary_name().get_name())
|
self.person.get_primary_name().get_name())
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([self.person.get_handle()]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([self.person.get_handle()]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
||||||
|
else:
|
||||||
|
self.filter_menu = GenericFilter.build_filter_menu([all])
|
||||||
filter_obj.set_menu(self.filter_menu)
|
filter_obj.set_menu(self.filter_menu)
|
||||||
|
|
||||||
the_box = self.top.get_widget("vbox1")
|
the_box = self.top.get_widget("vbox1")
|
||||||
|
@ -87,20 +87,23 @@ class GeneWebWriterOptionBox:
|
|||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
all.add_rule(GenericFilter.Everyone([]))
|
all.add_rule(GenericFilter.Everyone([]))
|
||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
if self.person:
|
||||||
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
des = GenericFilter.GenericFilter()
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
||||||
|
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") %
|
com.set_name(_("People with common ancestor with %s") %
|
||||||
self.person.get_primary_name().get_name())
|
self.person.get_primary_name().get_name())
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([self.person.get_handle()]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([self.person.get_handle()]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
||||||
|
else:
|
||||||
|
self.filter_menu = GenericFilter.build_filter_menu([all])
|
||||||
filter_obj.set_menu(self.filter_menu)
|
filter_obj.set_menu(self.filter_menu)
|
||||||
|
|
||||||
the_box = self.topDialog.get_widget('vbox1')
|
the_box = self.topDialog.get_widget('vbox1')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user