Use new family link; code was ready to fix--thanks
svn: r11547
This commit is contained in:
parent
614d4c2b2c
commit
36c291ba38
@ -361,23 +361,7 @@ class RecordsGramplet(Gramplet):
|
||||
last_value = value
|
||||
rank = number
|
||||
self.append_text("\n %s. " % (rank+1))
|
||||
# TODO: When linktype 'Family' is introduced, use this:
|
||||
# self.link(name, handletype, handle)
|
||||
# TODO: instead of this:
|
||||
if handletype == 'Family':
|
||||
family = self.dbstate.db.get_family_from_handle(handle)
|
||||
father_handle = family.get_father_handle()
|
||||
father = self.dbstate.db.get_person_from_handle(father_handle)
|
||||
father_name = _person_get_display_name(father, RecordsReportOptions.CALLNAME_DONTUSE)
|
||||
self.link(father_name, 'Person', father_handle)
|
||||
self.append_text(_(" and "))
|
||||
mother_handle = family.get_mother_handle()
|
||||
mother = self.dbstate.db.get_person_from_handle(mother_handle)
|
||||
mother_name = _person_get_display_name(mother, RecordsReportOptions.CALLNAME_DONTUSE)
|
||||
self.link(mother_name, 'Person', mother_handle)
|
||||
else:
|
||||
self.link(name, handletype, handle)
|
||||
# TODO: end.
|
||||
self.link(name, handletype, handle)
|
||||
self.append_text(" (%s)" % _output(value))
|
||||
self.append_text("\n")
|
||||
self.append_text("", scroll_to='begin')
|
||||
|
@ -312,19 +312,7 @@ class WhatNextGramplet(Gramplet):
|
||||
missingbits.append(_("relation type unknown"))
|
||||
|
||||
if missingbits:
|
||||
# TODO: When linktype 'Family' is introduced, use this:
|
||||
# self.link(name, 'Family', family.get_handle())
|
||||
# TODO: instead of this:
|
||||
if person1:
|
||||
self.link(name1, 'Person', person1.get_handle())
|
||||
else:
|
||||
self.append_text(name1)
|
||||
self.append_text(_(" and "))
|
||||
if person2:
|
||||
self.link(name2, 'Person', person2.get_handle())
|
||||
else:
|
||||
self.append_text(name2)
|
||||
# TODO: end.
|
||||
self.link(name, 'Family', family.get_handle())
|
||||
self.append_text(_(": %(list)s\n") % {
|
||||
'list': _(", ").join(missingbits)})
|
||||
self.__counter += 1
|
||||
|
Loading…
Reference in New Issue
Block a user