Show death/burial information only if person is proabably dead
This commit is contained in:
parent
03a89c73e3
commit
a592f7b2fd
@ -48,6 +48,7 @@ _ = glocale.translation.gettext
|
|||||||
from gramps.gen.errors import ReportError
|
from gramps.gen.errors import ReportError
|
||||||
from gramps.gen.lib import (EventType, FamilyRelType, Person, NoteType,
|
from gramps.gen.lib import (EventType, FamilyRelType, Person, NoteType,
|
||||||
EventRoleType)
|
EventRoleType)
|
||||||
|
from gramps.gen.utils.alive import probably_alive
|
||||||
from gramps.gen.utils.db import get_participant_from_event
|
from gramps.gen.utils.db import get_participant_from_event
|
||||||
from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||||
FONT_SANS_SERIF, FONT_SERIF,
|
FONT_SANS_SERIF, FONT_SERIF,
|
||||||
@ -333,13 +334,15 @@ class DetAncestorReport(Report):
|
|||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_died_string(self.calcageflag)
|
# Write Death and/or Burial text only if not probably alive
|
||||||
if text:
|
if not probably_alive(person, self.database):
|
||||||
self.doc.write_text_citation(text)
|
text = self.__narrator.get_died_string(self.calcageflag)
|
||||||
|
if text:
|
||||||
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_buried_string()
|
text = self.__narrator.get_buried_string()
|
||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
self.write_parents(person)
|
self.write_parents(person)
|
||||||
@ -629,9 +632,11 @@ class DetAncestorReport(Report):
|
|||||||
self.__narrator.get_born_string() or
|
self.__narrator.get_born_string() or
|
||||||
self.__narrator.get_christened_string() or
|
self.__narrator.get_christened_string() or
|
||||||
self.__narrator.get_baptised_string())
|
self.__narrator.get_baptised_string())
|
||||||
self.doc.write_text_citation(
|
# Write Death and/or Burial text only if not probably alive
|
||||||
self.__narrator.get_died_string() or
|
if not probably_alive(child, self.database):
|
||||||
self.__narrator.get_buried_string())
|
self.doc.write_text_citation(
|
||||||
|
self.__narrator.get_died_string() or
|
||||||
|
self.__narrator.get_buried_string())
|
||||||
# if the list_children_spouses option is selected:
|
# if the list_children_spouses option is selected:
|
||||||
if self.list_children_spouses:
|
if self.list_children_spouses:
|
||||||
# get the family of the child that contains the spouse
|
# get the family of the child that contains the spouse
|
||||||
@ -767,13 +772,15 @@ class DetAncestorReport(Report):
|
|||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_died_string(self.calcageflag)
|
# Write Death and/or Burial text only if not probably alive
|
||||||
if text:
|
if not probably_alive(ind, self.database):
|
||||||
self.doc.write_text_citation(text)
|
text = self.__narrator.get_died_string(self.calcageflag)
|
||||||
|
if text:
|
||||||
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_buried_string()
|
text = self.__narrator.get_buried_string()
|
||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
self.write_parents(ind)
|
self.write_parents(ind)
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
|
|||||||
_ = glocale.translation.gettext
|
_ = glocale.translation.gettext
|
||||||
from gramps.gen.errors import ReportError
|
from gramps.gen.errors import ReportError
|
||||||
from gramps.gen.lib import FamilyRelType, Person, NoteType
|
from gramps.gen.lib import FamilyRelType, Person, NoteType
|
||||||
|
from gramps.gen.utils.alive import probably_alive
|
||||||
from gramps.gen.plug.menu import (BooleanOption, NumberOption, PersonOption,
|
from gramps.gen.plug.menu import (BooleanOption, NumberOption, PersonOption,
|
||||||
EnumeratedListOption)
|
EnumeratedListOption)
|
||||||
from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||||
@ -725,9 +726,11 @@ class DetDescendantReport(Report):
|
|||||||
self.__narrator.get_born_string() or
|
self.__narrator.get_born_string() or
|
||||||
self.__narrator.get_christened_string() or
|
self.__narrator.get_christened_string() or
|
||||||
self.__narrator.get_baptised_string())
|
self.__narrator.get_baptised_string())
|
||||||
self.doc.write_text_citation(
|
# Write Death and/or Burial text only if not probably alive
|
||||||
self.__narrator.get_died_string() or
|
if not probably_alive(child, self.database):
|
||||||
self.__narrator.get_buried_string())
|
self.doc.write_text_citation(
|
||||||
|
self.__narrator.get_died_string() or
|
||||||
|
self.__narrator.get_buried_string())
|
||||||
# if the list_children_spouses option is selected:
|
# if the list_children_spouses option is selected:
|
||||||
if self.list_children_spouses:
|
if self.list_children_spouses:
|
||||||
# get the family of the child that contains the spouse
|
# get the family of the child that contains the spouse
|
||||||
@ -856,13 +859,15 @@ class DetDescendantReport(Report):
|
|||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_died_string(self.calcageflag)
|
# Write Death and/or Burial text only if not probably alive
|
||||||
if text:
|
if not probably_alive(person, self.database):
|
||||||
self.doc.write_text_citation(text)
|
text = self.__narrator.get_died_string(self.calcageflag)
|
||||||
|
if text:
|
||||||
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
text = self.__narrator.get_buried_string()
|
text = self.__narrator.get_buried_string()
|
||||||
if text:
|
if text:
|
||||||
self.doc.write_text_citation(text)
|
self.doc.write_text_citation(text)
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
self.__write_parents(person)
|
self.__write_parents(person)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user