insert name keys for indexing
svn: r6817
This commit is contained in:
parent
46a7b5bd5b
commit
e93c4575af
@ -1,3 +1,8 @@
|
||||
2006-05-29 Brian Matherly <brian@gramps-project.org>
|
||||
* src/plugins/DetDescendantReport.py: insert name keys for indexing.
|
||||
* src/plugins/DetAncestralReport.py: insert name keys for indexing.
|
||||
* src/plugins/FamilyGroup.py: print descriptions for events.
|
||||
|
||||
2006-05-29 Alex Roitman <shura@gramps-project.org>
|
||||
* src/Editors/_EditFamily.py (EditFamily.save): Typo.
|
||||
* configure.in: Set up for 2.1.5.
|
||||
|
@ -195,9 +195,10 @@ class DetAncestorReport(Report.Report):
|
||||
self.doc.start_paragraph("DAR-First-Entry","%s." % str(key))
|
||||
|
||||
name = _nd.display_formal(person)
|
||||
pkey = ReportUtils.get_person_key(self.database, person)
|
||||
|
||||
self.doc.start_bold()
|
||||
self.doc.write_text(name)
|
||||
self.doc.write_text(name,pkey)
|
||||
if name[-1:] == '.':
|
||||
self.doc.write_text(" ")
|
||||
else:
|
||||
@ -341,19 +342,27 @@ class DetAncestorReport(Report.Report):
|
||||
if mother_handle:
|
||||
mother = self.database.get_person_from_handle(mother_handle)
|
||||
mother_name = _nd.display_name(mother.get_primary_name())
|
||||
mother_key = ReportUtils.get_person_key(self.database, mother)
|
||||
else:
|
||||
mother_name = ""
|
||||
mother_key = ""
|
||||
if father_handle:
|
||||
father = self.database.get_person_from_handle(father_handle)
|
||||
father_name = _nd.display_name(father.get_primary_name())
|
||||
father_key = ReportUtils.get_person_key(self.database, father)
|
||||
else:
|
||||
father_name = ""
|
||||
father_key = ""
|
||||
|
||||
text = ReportUtils.child_str(person, father_name, mother_name,
|
||||
bool(person.get_death_ref()),
|
||||
firstName)
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
if father_key != "":
|
||||
self.doc.write_text("",father_key)
|
||||
if mother_key != "":
|
||||
self.doc.write_text("",mother_key)
|
||||
|
||||
def write_marriage(self, person):
|
||||
"""
|
||||
@ -366,6 +375,7 @@ class DetAncestorReport(Report.Report):
|
||||
spouse = self.database.get_person_from_handle(spouse_handle)
|
||||
marriage_event = ReportUtils.find_marriage(self.database,family)
|
||||
text = ""
|
||||
spouse_key = ReportUtils.get_person_key(self.database, spouse)
|
||||
if marriage_event:
|
||||
text = ReportUtils.married_str(self.database,person,spouse,
|
||||
marriage_event,self.endnotes,
|
||||
@ -375,7 +385,7 @@ class DetAncestorReport(Report.Report):
|
||||
text = ReportUtils.married_rel_str(self.database,person,family,
|
||||
is_first)
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
self.doc.write_text(text,spouse_key)
|
||||
is_first = False
|
||||
|
||||
def write_children(self, family):
|
||||
@ -409,6 +419,7 @@ class DetAncestorReport(Report.Report):
|
||||
child_handle = child_ref.ref
|
||||
child = self.database.get_person_from_handle(child_handle)
|
||||
child_name = _nd.display(child)
|
||||
child_key = ReportUtils.get_person_key(self.database,child)
|
||||
|
||||
if self.childRef and self.prev_gen_handles.get(child_handle):
|
||||
value = str(self.prev_gen_handles.get(child_handle))
|
||||
@ -417,7 +428,7 @@ class DetAncestorReport(Report.Report):
|
||||
self.doc.start_paragraph("DAR-ChildList",ReportUtils.roman(cnt).lower() + ".")
|
||||
cnt += 1
|
||||
|
||||
self.doc.write_text("%s. " % child_name)
|
||||
self.doc.write_text("%s. " % child_name,child_key)
|
||||
self.doc.write_text(ReportUtils.born_str(self.database, child, 0,
|
||||
self.EMPTY_DATE, self.EMPTY_PLACE))
|
||||
self.doc.write_text(ReportUtils.died_str(self.database, child, 0,
|
||||
@ -432,6 +443,7 @@ class DetAncestorReport(Report.Report):
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
person_name = ""
|
||||
ind_handle = None
|
||||
person_key = ""
|
||||
if mate.get_gender() == RelLib.Person.MALE:
|
||||
ind_handle = family.get_mother_handle()
|
||||
else:
|
||||
@ -439,6 +451,7 @@ class DetAncestorReport(Report.Report):
|
||||
if ind_handle:
|
||||
ind = self.database.get_person_from_handle(ind_handle)
|
||||
person_name = _nd.display(ind)
|
||||
person_key = ReportUtils.get_person_key(self.database,ind)
|
||||
firstName = ReportUtils.common_name(ind,self.usenick)
|
||||
else:
|
||||
firstName = 0
|
||||
@ -446,7 +459,7 @@ class DetAncestorReport(Report.Report):
|
||||
if person_name:
|
||||
self.doc.start_paragraph("DAR-Entry")
|
||||
|
||||
self.doc.write_text(person_name)
|
||||
self.doc.write_text(person_name,person_key)
|
||||
|
||||
text = ReportUtils.born_str(self.database,ind,"",
|
||||
self.EMPTY_DATE,self.EMPTY_PLACE)
|
||||
|
@ -226,9 +226,10 @@ class DetDescendantReport(Report.Report):
|
||||
self.doc.start_paragraph("DDR-First-Entry","%s." % val)
|
||||
|
||||
name = _nd.display_formal(person)
|
||||
pkey = ReportUtils.get_person_key(self.database, person)
|
||||
|
||||
self.doc.start_bold()
|
||||
self.doc.write_text(name)
|
||||
self.doc.write_text(name,pkey)
|
||||
if name[-1:] == '.':
|
||||
self.doc.write_text(" ")
|
||||
else:
|
||||
@ -369,19 +370,27 @@ class DetDescendantReport(Report.Report):
|
||||
if mother_handle:
|
||||
mother = self.database.get_person_from_handle(mother_handle)
|
||||
mother_name = _nd.display_name(mother.get_primary_name())
|
||||
mother_key = ReportUtils.get_person_key(self.database, mother)
|
||||
else:
|
||||
mother_name = ""
|
||||
mother_key = ""
|
||||
if father_handle:
|
||||
father = self.database.get_person_from_handle(father_handle)
|
||||
father_name = _nd.display_name(father.get_primary_name())
|
||||
father_key = ReportUtils.get_person_key(self.database, father)
|
||||
else:
|
||||
father_name = ""
|
||||
father_key = ""
|
||||
|
||||
text = ReportUtils.child_str(person, father_name, mother_name,
|
||||
bool(person.get_death_ref()),
|
||||
firstName)
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
if father_key != "":
|
||||
self.doc.write_text("",father_key)
|
||||
if mother_key != "":
|
||||
self.doc.write_text("",mother_key)
|
||||
|
||||
def write_marriage(self, person):
|
||||
"""
|
||||
@ -394,6 +403,7 @@ class DetDescendantReport(Report.Report):
|
||||
spouse = self.database.get_person_from_handle(spouse_handle)
|
||||
marriage_event = ReportUtils.find_marriage(self.database,family)
|
||||
text = ""
|
||||
spouse_key = ReportUtils.get_person_key(self.database, spouse)
|
||||
if marriage_event:
|
||||
text = ReportUtils.married_str(self.database,person,spouse,
|
||||
marriage_event,self.endnotes,
|
||||
@ -403,7 +413,7 @@ class DetDescendantReport(Report.Report):
|
||||
text = ReportUtils.married_rel_str(self.database,person,family,
|
||||
is_first)
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
self.doc.write_text(text,spouse_key)
|
||||
is_first = False
|
||||
|
||||
def write_children(self, family):
|
||||
@ -437,6 +447,7 @@ class DetDescendantReport(Report.Report):
|
||||
child_handle = child_ref.ref
|
||||
child = self.database.get_person_from_handle(child_handle)
|
||||
child_name = _nd.display(child)
|
||||
child_key = ReportUtils.get_person_key(self.database,child)
|
||||
|
||||
if self.childRef and self.prev_gen_handles.get(child_handle):
|
||||
value = str(self.prev_gen_handles.get(child_handle))
|
||||
@ -448,9 +459,10 @@ class DetDescendantReport(Report.Report):
|
||||
|
||||
if self.henry.has_key(child_handle):
|
||||
self.doc.write_text("%s [%s]. " % (child_name,
|
||||
self.henry[child_handle]))
|
||||
self.henry[child_handle]),
|
||||
child_key )
|
||||
else:
|
||||
self.doc.write_text("%s. " % child_name)
|
||||
self.doc.write_text("%s. " % child_name,child_Key)
|
||||
|
||||
self.doc.write_text(ReportUtils.born_str(
|
||||
self.database, child, 0, self.EMPTY_DATE, self.EMPTY_PLACE))
|
||||
@ -465,6 +477,7 @@ class DetDescendantReport(Report.Report):
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
person_name = ""
|
||||
ind_handle = None
|
||||
person_key = ""
|
||||
if mate.get_gender() == RelLib.Person.MALE:
|
||||
ind_handle = family.get_mother_handle()
|
||||
else:
|
||||
@ -472,6 +485,7 @@ class DetDescendantReport(Report.Report):
|
||||
if ind_handle:
|
||||
ind = self.database.get_person_from_handle(ind_handle)
|
||||
person_name = _nd.display(ind)
|
||||
person_key = ReportUtils.get_person_key(self.database,ind)
|
||||
firstName = ReportUtils.common_name(ind,self.usenick)
|
||||
else:
|
||||
firstName = 0
|
||||
@ -479,7 +493,7 @@ class DetDescendantReport(Report.Report):
|
||||
if person_name:
|
||||
self.doc.start_paragraph("DDR-Entry")
|
||||
|
||||
self.doc.write_text(person_name)
|
||||
self.doc.write_text(person_name,person_key)
|
||||
|
||||
text = ReportUtils.born_str(self.database,ind,"",
|
||||
self.EMPTY_DATE,self.EMPTY_PLACE)
|
||||
|
@ -159,28 +159,47 @@ class FamilyGroup(Report.Report):
|
||||
def dump_parent_event(self,name,event):
|
||||
place = ""
|
||||
date = ""
|
||||
descr = ""
|
||||
if event:
|
||||
date = DateHandler.get_date(event)
|
||||
place_handle = event.get_place_handle()
|
||||
if place_handle:
|
||||
place = self.database.get_place_from_handle(place_handle).get_title()
|
||||
place = ReportUtils.place_name(self.database,place_handle)
|
||||
descr = event.get_description()
|
||||
|
||||
self.doc.start_row()
|
||||
self.doc.start_cell("FGR-TextContents")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(name)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.start_cell("FGR-TextContents")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(date)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.start_cell("FGR-TextContentsEnd")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(place)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.end_row()
|
||||
|
||||
if descr:
|
||||
self.doc.start_cell("FGR-TextContents",2)
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(descr)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.end_row()
|
||||
|
||||
if date or place:
|
||||
self.doc.start_row()
|
||||
self.doc.start_cell("FGR-TextContents")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
|
||||
if (date or place) or not descr:
|
||||
self.doc.start_cell("FGR-TextContents")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(date)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.start_cell("FGR-TextContentsEnd")
|
||||
self.doc.start_paragraph('FGR-Normal')
|
||||
self.doc.write_text(place)
|
||||
self.doc.end_paragraph()
|
||||
self.doc.end_cell()
|
||||
self.doc.end_row()
|
||||
|
||||
def dump_parent_parents(self,person):
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
|
Loading…
Reference in New Issue
Block a user