* src/WriteGedcom.py: Pass gramps_id to filter rules.
* src/plugins/ExportVCalendar.py: Pass gramps_id to filter rules. * src/plugins/ExportVCard.py: Pass gramps_id to filter rules. * src/plugins/GraphViz.py: Pass gramps_id to filter rules. * src/plugins/IndivComplete.py: Pass gramps_id to filter rules. * src/plugins/NavWebPage.py: Pass gramps_id to filter rules. * src/plugins/StatisticsChart.py: Pass gramps_id to filter rules. * src/plugins/TimeLine.py: Pass gramps_id to filter rules. * src/plugins/WebPage.py: Pass gramps_id to filter rules. * src/plugins/WriteFtree.py: Pass gramps_id to filter rules. * src/plugins/WriteGeneWeb.py: Pass gramps_id to filter rules. svn: r4838
This commit is contained in:
parent
880c3e7751
commit
fdc3979278
@ -3,6 +3,18 @@
|
|||||||
creator; (write_person): write person sources; (sid): return
|
creator; (write_person): write person sources; (sid): return
|
||||||
gramps_id; (write_families): write family sources.
|
gramps_id; (write_families): write family sources.
|
||||||
|
|
||||||
|
* src/WriteGedcom.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/ExportVCalendar.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/ExportVCard.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/GraphViz.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/IndivComplete.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/NavWebPage.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/StatisticsChart.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/TimeLine.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/WebPage.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/WriteFtree.py: Pass gramps_id to filter rules.
|
||||||
|
* src/plugins/WriteGeneWeb.py: Pass gramps_id to filter rules.
|
||||||
|
|
||||||
2005-06-16 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-06-16 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/gramps_main.py (on_merge_activate,on_fast_merge_activate):
|
* src/gramps_main.py (on_merge_activate,on_fast_merge_activate):
|
||||||
only merge if exactly two persons have been selected
|
only merge if exactly two persons have been selected
|
||||||
|
@ -331,17 +331,22 @@ class GedcomWriterOptionBox:
|
|||||||
|
|
||||||
if self.person:
|
if self.person:
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % NameDisplay.displayer.display(self.person))
|
des.set_name(_("Descendants of %s") %
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
NameDisplay.displayer.display(self.person))
|
||||||
|
des.add_rule(GenericFilter.IsDescendantOf(
|
||||||
|
[self.person.get_gramps_id(),1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % NameDisplay.displayer.display(self.person))
|
ans.set_name(_("Ancestors of %s")
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
% NameDisplay.displayer.display(self.person))
|
||||||
|
ans.add_rule(GenericFilter.IsAncestorOf(
|
||||||
|
[self.person.get_gramps_id(),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") %
|
||||||
NameDisplay.displayer.display(self.person))
|
NameDisplay.displayer.display(self.person))
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([self.person.get_handle()]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith(
|
||||||
|
[self.person.get_gramps_id()]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
||||||
else:
|
else:
|
||||||
@ -739,6 +744,7 @@ class GedcomWriter:
|
|||||||
|
|
||||||
for srcref in family.get_source_references():
|
for srcref in family.get_source_references():
|
||||||
self.write_source_ref(1,srcref)
|
self.write_source_ref(1,srcref)
|
||||||
|
|
||||||
self.write_change(1,family.get_change_time())
|
self.write_change(1,family.get_change_time())
|
||||||
|
|
||||||
def write_sources(self):
|
def write_sources(self):
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004 Martin Hawlisch
|
# Copyright (C) 2004 Martin Hawlisch
|
||||||
|
# Copyright (C) 2005 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -81,20 +82,29 @@ class CalendarWriterOptionBox:
|
|||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
all.add_rule(GenericFilter.Everyone([]))
|
all.add_rule(GenericFilter.Everyone([]))
|
||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
if 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") %
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
|
||||||
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
|
||||||
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()]))
|
des.add_rule(GenericFilter.IsDescendantOf(
|
||||||
|
[self.person.get_gramps_id(),1]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
ans = GenericFilter.GenericFilter()
|
||||||
|
ans.set_name(_("Ancestors of %s") %
|
||||||
|
self.person.get_primary_name().get_name())
|
||||||
|
ans.add_rule(GenericFilter.IsAncestorOf(
|
||||||
|
[self.person.get_gramps_id(),1]))
|
||||||
|
|
||||||
|
com = GenericFilter.GenericFilter()
|
||||||
|
com.set_name(_("People with common ancestor with %s") %
|
||||||
|
self.person.get_primary_name().get_name())
|
||||||
|
com.add_rule(GenericFilter.HasCommonAncestorWith(
|
||||||
|
[self.person.get_gramps_id()]))
|
||||||
|
|
||||||
|
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')
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004 Martin Hawlisch
|
# Copyright (C) 2004 Martin Hawlisch
|
||||||
|
# Copyright (C) 2005 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -27,7 +28,6 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
import string
|
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@ -84,20 +84,29 @@ class CardWriterOptionBox:
|
|||||||
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") %
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
|
||||||
ans.set_name(_("Ancestors of %s") % self.person.get_primary_name().get_name())
|
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
|
||||||
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()]))
|
des.add_rule(GenericFilter.IsDescendantOf(
|
||||||
|
[self.person.get_gramps_id(),1]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
ans = GenericFilter.GenericFilter()
|
||||||
|
ans.set_name(_("Ancestors of %s") %
|
||||||
|
self.person.get_primary_name().get_name())
|
||||||
|
ans.add_rule(GenericFilter.IsAncestorOf(
|
||||||
|
[self.person.get_gramps_id(),1]))
|
||||||
|
|
||||||
|
com = GenericFilter.GenericFilter()
|
||||||
|
com.set_name(_("People with common ancestor with %s") %
|
||||||
|
self.person.get_primary_name().get_name())
|
||||||
|
com.add_rule(GenericFilter.HasCommonAncestorWith(
|
||||||
|
[self.person.get_gramps_id()]))
|
||||||
|
|
||||||
|
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')
|
||||||
|
@ -504,10 +504,10 @@ class GraphVizOptions(ReportOptions.ReportOptions):
|
|||||||
"""Set up the list of possible content filters."""
|
"""Set up the list of possible content filters."""
|
||||||
if person:
|
if person:
|
||||||
name = person.get_primary_name().get_name()
|
name = person.get_primary_name().get_name()
|
||||||
handle = person.get_handle()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
handle = ''
|
gramps_id = ''
|
||||||
|
|
||||||
all = GenericFilter.GenericFilter()
|
all = GenericFilter.GenericFilter()
|
||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
@ -515,15 +515,15 @@ class GraphVizOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % name)
|
des.set_name(_("Descendants of %s") % name)
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([handle,1]))
|
des.add_rule(GenericFilter.IsDescendantOf([gramps_id,1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % name)
|
ans.set_name(_("Ancestors of %s") % name)
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([handle,1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([gramps_id,1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") % name)
|
com.set_name(_("People with common ancestor with %s") % name)
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([handle]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([gramps_id]))
|
||||||
|
|
||||||
return [all,des,ans,com]
|
return [all,des,ans,com]
|
||||||
|
|
||||||
|
@ -497,14 +497,14 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
|
|||||||
"""Set up the list of possible content filters."""
|
"""Set up the list of possible content filters."""
|
||||||
if person:
|
if person:
|
||||||
name = person.get_primary_name().get_name()
|
name = person.get_primary_name().get_name()
|
||||||
handle = person.get_handle()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
handle = ''
|
gramps_id = ''
|
||||||
|
|
||||||
filt_id = GenericFilter.GenericFilter()
|
filt_id = GenericFilter.GenericFilter()
|
||||||
filt_id.set_name(name)
|
filt_id.set_name(name)
|
||||||
filt_id.add_rule(GenericFilter.HasIdOf([handle]))
|
filt_id.add_rule(GenericFilter.HasIdOf([gramps_id]))
|
||||||
|
|
||||||
all = GenericFilter.GenericFilter()
|
all = GenericFilter.GenericFilter()
|
||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
@ -512,15 +512,15 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % name)
|
des.set_name(_("Descendants of %s") % name)
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([handle,1]))
|
des.add_rule(GenericFilter.IsDescendantOf([gramps_id,1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % name)
|
ans.set_name(_("Ancestors of %s") % name)
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([handle,1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([gramps_id,1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") % name)
|
com.set_name(_("People with common ancestor with %s") % name)
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([handle]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([gramps_id]))
|
||||||
|
|
||||||
return [filt_id,all,des,ans,com]
|
return [filt_id,all,des,ans,com]
|
||||||
|
|
||||||
|
@ -1126,10 +1126,10 @@ class WebReportOptions(ReportOptions.ReportOptions):
|
|||||||
"""Set up the list of possible content filters."""
|
"""Set up the list of possible content filters."""
|
||||||
if person:
|
if person:
|
||||||
name = person.get_primary_name().get_name()
|
name = person.get_primary_name().get_name()
|
||||||
handle = person.get_handle()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
handle = ''
|
gramps_is = ''
|
||||||
|
|
||||||
all = GenericFilter.GenericFilter()
|
all = GenericFilter.GenericFilter()
|
||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
@ -1137,19 +1137,19 @@ class WebReportOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % name)
|
des.set_name(_("Descendants of %s") % name)
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([handle,1]))
|
des.add_rule(GenericFilter.IsDescendantOf([gramps_id,1]))
|
||||||
|
|
||||||
df = GenericFilter.GenericFilter()
|
df = GenericFilter.GenericFilter()
|
||||||
df.set_name(_("Descendant Families of %s") % name)
|
df.set_name(_("Descendant Families of %s") % name)
|
||||||
df.add_rule(GenericFilter.IsDescendantFamilyOf([handle]))
|
df.add_rule(GenericFilter.IsDescendantFamilyOf([gramps_id]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % name)
|
ans.set_name(_("Ancestors of %s") % name)
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([handle,1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([gramps_id,1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") % name)
|
com.set_name(_("People with common ancestor with %s") % name)
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([handle]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([gramps_id]))
|
||||||
|
|
||||||
return [all,des,df,ans,com]
|
return [all,des,df,ans,com]
|
||||||
|
|
||||||
|
@ -818,10 +818,10 @@ class StatisticsChartOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
if person:
|
if person:
|
||||||
name = person.get_primary_name().get_name()
|
name = person.get_primary_name().get_name()
|
||||||
handle = person.get_handle()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
handle = ''
|
gramps_id = ''
|
||||||
|
|
||||||
all = GenericFilter.GenericFilter()
|
all = GenericFilter.GenericFilter()
|
||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
@ -829,15 +829,15 @@ class StatisticsChartOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % name)
|
des.set_name(_("Descendants of %s") % name)
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([handle, 1]))
|
des.add_rule(GenericFilter.IsDescendantOf([gramps_id, 1]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % name)
|
ans.set_name(_("Ancestors of %s") % name)
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([handle, 1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([gramps_id, 1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") % name)
|
com.set_name(_("People with common ancestor with %s") % name)
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([handle]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([gramps_id]))
|
||||||
|
|
||||||
return [all, des, ans, com]
|
return [all, des, ans, com]
|
||||||
|
|
||||||
|
@ -1256,10 +1256,10 @@ class WebReportOptions(ReportOptions.ReportOptions):
|
|||||||
"""Set up the list of possible content filters."""
|
"""Set up the list of possible content filters."""
|
||||||
if person:
|
if person:
|
||||||
name = person.get_primary_name().get_name()
|
name = person.get_primary_name().get_name()
|
||||||
handle = person.get_handle()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
handle = ''
|
gramps_id = ''
|
||||||
|
|
||||||
all = GenericFilter.GenericFilter()
|
all = GenericFilter.GenericFilter()
|
||||||
all.set_name(_("Entire Database"))
|
all.set_name(_("Entire Database"))
|
||||||
@ -1267,19 +1267,19 @@ class WebReportOptions(ReportOptions.ReportOptions):
|
|||||||
|
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % name)
|
des.set_name(_("Descendants of %s") % name)
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([handle,1]))
|
des.add_rule(GenericFilter.IsDescendantOf([gramps_id,1]))
|
||||||
|
|
||||||
df = GenericFilter.GenericFilter()
|
df = GenericFilter.GenericFilter()
|
||||||
df.set_name(_("Descendant Families of %s") % name)
|
df.set_name(_("Descendant Families of %s") % name)
|
||||||
df.add_rule(GenericFilter.IsDescendantFamilyOf([handle]))
|
df.add_rule(GenericFilter.IsDescendantFamilyOf([gramps_id]))
|
||||||
|
|
||||||
ans = GenericFilter.GenericFilter()
|
ans = GenericFilter.GenericFilter()
|
||||||
ans.set_name(_("Ancestors of %s") % name)
|
ans.set_name(_("Ancestors of %s") % name)
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([handle,1]))
|
ans.add_rule(GenericFilter.IsAncestorOf([gramps_id,1]))
|
||||||
|
|
||||||
com = GenericFilter.GenericFilter()
|
com = GenericFilter.GenericFilter()
|
||||||
com.set_name(_("People with common ancestor with %s") % name)
|
com.set_name(_("People with common ancestor with %s") % name)
|
||||||
com.add_rule(GenericFilter.HasCommonAncestorWith([handle]))
|
com.add_rule(GenericFilter.HasCommonAncestorWith([gramps_id]))
|
||||||
|
|
||||||
return [all,des,df,ans,com]
|
return [all,des,df,ans,com]
|
||||||
|
|
||||||
|
@ -88,17 +88,22 @@ class FtreeWriterOptionBox:
|
|||||||
|
|
||||||
if self.person:
|
if self.person:
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
des.set_name(_("Descendants of %s") %
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
self.person.get_primary_name().get_name())
|
||||||
|
des.add_rule(GenericFilter.IsDescendantOf(
|
||||||
|
[self.person.get_gramps_id(),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")
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
% self.person.get_primary_name().get_name())
|
||||||
|
ans.add_rule(GenericFilter.IsAncestorOf(
|
||||||
|
[self.person.get_gramps_id(),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_gramps_id()]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
||||||
else:
|
else:
|
||||||
|
@ -89,19 +89,25 @@ class GeneWebWriterOptionBox:
|
|||||||
|
|
||||||
if self.person:
|
if self.person:
|
||||||
des = GenericFilter.GenericFilter()
|
des = GenericFilter.GenericFilter()
|
||||||
des.set_name(_("Descendants of %s") % self.person.get_primary_name().get_name())
|
des.set_name(_("Descendants of %s") %
|
||||||
des.add_rule(GenericFilter.IsDescendantOf([self.person.get_handle(),1]))
|
self.person.get_primary_name().get_name())
|
||||||
|
des.add_rule(GenericFilter.IsDescendantOf(
|
||||||
|
[self.person.get_gramps_id(),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") %
|
||||||
ans.add_rule(GenericFilter.IsAncestorOf([self.person.get_handle(),1]))
|
self.person.get_primary_name().get_name())
|
||||||
|
ans.add_rule(GenericFilter.IsAncestorOf(
|
||||||
|
[self.person.get_gramps_id(),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_gramps_id()]))
|
||||||
|
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
self.filter_menu = GenericFilter.build_filter_menu(
|
||||||
|
[all,des,ans,com])
|
||||||
else:
|
else:
|
||||||
self.filter_menu = GenericFilter.build_filter_menu([all])
|
self.filter_menu = GenericFilter.build_filter_menu([all])
|
||||||
filter_obj.set_menu(self.filter_menu)
|
filter_obj.set_menu(self.filter_menu)
|
||||||
|
Loading…
Reference in New Issue
Block a user