* src/plugins/IndivComplete.py: Use NameDisplay.
* src/plugins/FamilyGroup.py: Use NameDisplay. svn: r7051
This commit is contained in:
parent
3a20c1bf4f
commit
f3fed49b9f
@ -1,4 +1,6 @@
|
|||||||
2006-07-20 Alex Roitman <shura@gramps-project.org>
|
2006-07-20 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/plugins/IndivComplete.py: Use NameDisplay.
|
||||||
|
* src/plugins/FamilyGroup.py: Use NameDisplay.
|
||||||
* src/GrampsCfg.py (add_name_panel): Minor UI improvements;
|
* src/GrampsCfg.py (add_name_panel): Minor UI improvements;
|
||||||
(_build_custom_name_ui): Minor UI improvements;
|
(_build_custom_name_ui): Minor UI improvements;
|
||||||
(cb_edit_fmt_str): Make correct transient_for call.
|
(cb_edit_fmt_str): Make correct transient_for call.
|
||||||
|
@ -42,6 +42,7 @@ import BaseDoc
|
|||||||
import DateHandler
|
import DateHandler
|
||||||
import Utils
|
import Utils
|
||||||
from TransUtils import sgettext as _
|
from TransUtils import sgettext as _
|
||||||
|
from NameDisplay import displayer as _nd
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -212,7 +213,7 @@ class FamilyGroup(Report):
|
|||||||
father_handle = family.get_father_handle()
|
father_handle = family.get_father_handle()
|
||||||
if father_handle:
|
if father_handle:
|
||||||
father = self.database.get_person_from_handle(father_handle)
|
father = self.database.get_person_from_handle(father_handle)
|
||||||
father_name = father.get_primary_name().get_regular_name()
|
father_name = _nd.display(father)
|
||||||
if self.incRelDates:
|
if self.incRelDates:
|
||||||
birth_ref = father.get_birth_ref()
|
birth_ref = father.get_birth_ref()
|
||||||
birth = " "
|
birth = " "
|
||||||
@ -229,7 +230,7 @@ class FamilyGroup(Report):
|
|||||||
mother_handle = family.get_mother_handle()
|
mother_handle = family.get_mother_handle()
|
||||||
if mother_handle:
|
if mother_handle:
|
||||||
mother = self.database.get_person_from_handle(mother_handle)
|
mother = self.database.get_person_from_handle(mother_handle)
|
||||||
mother_name = mother.get_primary_name().get_regular_name()
|
mother_name = _nd.display(mother)
|
||||||
if self.incRelDates:
|
if self.incRelDates:
|
||||||
birth_ref = mother.get_birth_ref()
|
birth_ref = mother.get_birth_ref()
|
||||||
birth = " "
|
birth = " "
|
||||||
@ -300,7 +301,7 @@ class FamilyGroup(Report):
|
|||||||
person = RelLib.Person()
|
person = RelLib.Person()
|
||||||
else:
|
else:
|
||||||
person = self.database.get_person_from_handle(person_handle)
|
person = self.database.get_person_from_handle(person_handle)
|
||||||
name = person.get_primary_name().get_regular_name()
|
name = _nd.display(person)
|
||||||
|
|
||||||
self.doc.start_table(title,'FGR-ParentTable')
|
self.doc.start_table(title,'FGR-ParentTable')
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
@ -369,9 +370,9 @@ class FamilyGroup(Report):
|
|||||||
|
|
||||||
if self.incParNames:
|
if self.incParNames:
|
||||||
for alt_name in person.get_alternate_names():
|
for alt_name in person.get_alternate_names():
|
||||||
type = str( alt_name.get_type() )
|
name_type = str( alt_name.get_type() )
|
||||||
name = alt_name.get_regular_name()
|
name = _nd.display_name(alt_name)
|
||||||
self.dump_parent_line(type,name)
|
self.dump_parent_line(name_type,name)
|
||||||
|
|
||||||
self.doc.end_table()
|
self.doc.end_table()
|
||||||
|
|
||||||
@ -518,7 +519,7 @@ class FamilyGroup(Report):
|
|||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
|
|
||||||
name = person.get_primary_name().get_regular_name()
|
name = _nd.display(person)
|
||||||
mark = ReportUtils.get_person_mark(self.database,person)
|
mark = ReportUtils.get_person_mark(self.database,person)
|
||||||
self.doc.start_cell('FGR-ChildName',3)
|
self.doc.start_cell('FGR-ChildName',3)
|
||||||
self.doc.start_paragraph('FGR-ChildText')
|
self.doc.start_paragraph('FGR-ChildText')
|
||||||
@ -578,7 +579,7 @@ class FamilyGroup(Report):
|
|||||||
self.doc.start_paragraph('FGR-Normal')
|
self.doc.start_paragraph('FGR-Normal')
|
||||||
|
|
||||||
spouse = self.database.get_person_from_handle(spouse_id)
|
spouse = self.database.get_person_from_handle(spouse_id)
|
||||||
spouse_name = spouse.get_primary_name().get_regular_name()
|
spouse_name = _nd.display(spouse)
|
||||||
if self.incRelDates:
|
if self.incRelDates:
|
||||||
birth = " "
|
birth = " "
|
||||||
birth_ref = spouse.get_birth_ref()
|
birth_ref = spouse.get_birth_ref()
|
||||||
|
@ -49,6 +49,7 @@ import DateHandler
|
|||||||
from PluginUtils import register_report
|
from PluginUtils import register_report
|
||||||
from ReportBase import Report, ReportUtils, ReportOptions, \
|
from ReportBase import Report, ReportUtils, ReportOptions, \
|
||||||
CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI
|
CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI
|
||||||
|
from NameDisplay import displayer as _nd
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -228,7 +229,7 @@ class IndivCompleteReport(Report):
|
|||||||
father_handle = family.get_father_handle()
|
father_handle = family.get_father_handle()
|
||||||
if father_handle:
|
if father_handle:
|
||||||
father = self.database.get_person_from_handle(father_handle)
|
father = self.database.get_person_from_handle(father_handle)
|
||||||
fname = father.get_primary_name().get_regular_name()
|
fname = _nd.display(father)
|
||||||
mark = ReportUtils.get_person_mark(self.database,father)
|
mark = ReportUtils.get_person_mark(self.database,father)
|
||||||
self.write_p_entry(_('Father'),fname,frel,mark)
|
self.write_p_entry(_('Father'),fname,frel,mark)
|
||||||
else:
|
else:
|
||||||
@ -237,9 +238,9 @@ class IndivCompleteReport(Report):
|
|||||||
mother_handle = family.get_mother_handle()
|
mother_handle = family.get_mother_handle()
|
||||||
if mother_handle:
|
if mother_handle:
|
||||||
mother = self.database.get_person_from_handle(mother_handle)
|
mother = self.database.get_person_from_handle(mother_handle)
|
||||||
fname = mother.get_primary_name().get_regular_name()
|
mname = _nd.display(mother)
|
||||||
mark = ReportUtils.get_person_mark(self.database,father)
|
mark = ReportUtils.get_person_mark(self.database,mother)
|
||||||
self.write_p_entry(_('Mother'),fname,frel,mark)
|
self.write_p_entry(_('Mother'),mname,mrel,mark)
|
||||||
else:
|
else:
|
||||||
self.write_p_entry(_('Mother'),'','')
|
self.write_p_entry(_('Mother'),'','')
|
||||||
|
|
||||||
@ -262,10 +263,10 @@ class IndivCompleteReport(Report):
|
|||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
for name in self.start_person.get_alternate_names():
|
for name in self.start_person.get_alternate_names():
|
||||||
type = str( name.get_type() )
|
name_type = str( name.get_type() )
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.normal_cell(type)
|
self.normal_cell(name_type)
|
||||||
text = name.get_regular_name()
|
text = _nd.display_name(name)
|
||||||
if self.use_srcs:
|
if self.use_srcs:
|
||||||
for s in name.get_source_references():
|
for s in name.get_source_references():
|
||||||
src_handle = s.get_reference_handle()
|
src_handle = s.get_reference_handle()
|
||||||
@ -303,7 +304,7 @@ class IndivCompleteReport(Report):
|
|||||||
self.doc.start_paragraph("IDS-Spouse")
|
self.doc.start_paragraph("IDS-Spouse")
|
||||||
if spouse_id:
|
if spouse_id:
|
||||||
spouse = self.database.get_person_from_handle(spouse_id)
|
spouse = self.database.get_person_from_handle(spouse_id)
|
||||||
text = spouse.get_primary_name().get_regular_name()
|
text = _nd.display(spouse)
|
||||||
mark = ReportUtils.get_person_mark(self.database,spouse)
|
mark = ReportUtils.get_person_mark(self.database,spouse)
|
||||||
else:
|
else:
|
||||||
text = _("unknown")
|
text = _("unknown")
|
||||||
@ -333,7 +334,7 @@ class IndivCompleteReport(Report):
|
|||||||
else:
|
else:
|
||||||
self.doc.write_text('\n')
|
self.doc.write_text('\n')
|
||||||
child = self.database.get_person_from_handle(child_ref.ref)
|
child = self.database.get_person_from_handle(child_ref.ref)
|
||||||
name = child.get_primary_name().get_regular_name()
|
name = _nd.display(child)
|
||||||
mark = ReportUtils.get_person_mark(self.database,child)
|
mark = ReportUtils.get_person_mark(self.database,child)
|
||||||
self.doc.write_text(name,mark)
|
self.doc.write_text(name,mark)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -412,7 +413,7 @@ class IndivCompleteReport(Report):
|
|||||||
self.slist = []
|
self.slist = []
|
||||||
|
|
||||||
media_list = self.start_person.get_media_list()
|
media_list = self.start_person.get_media_list()
|
||||||
name = self.start_person.get_primary_name().get_regular_name()
|
name = _nd.display(self.start_person)
|
||||||
title = _("Summary of %s") % name
|
title = _("Summary of %s") % name
|
||||||
mark = BaseDoc.IndexMark(title,BaseDoc.INDEX_TYPE_TOC,1)
|
mark = BaseDoc.IndexMark(title,BaseDoc.INDEX_TYPE_TOC,1)
|
||||||
self.doc.start_paragraph("IDS-Title")
|
self.doc.start_paragraph("IDS-Title")
|
||||||
@ -437,7 +438,7 @@ class IndivCompleteReport(Report):
|
|||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.normal_cell("%s:" % _("Name"))
|
self.normal_cell("%s:" % _("Name"))
|
||||||
name = self.start_person.get_primary_name()
|
name = self.start_person.get_primary_name()
|
||||||
text = name.get_regular_name()
|
text = _nd.display_name(name)
|
||||||
mark = ReportUtils.get_person_mark(self.database, self.start_person)
|
mark = ReportUtils.get_person_mark(self.database, self.start_person)
|
||||||
if self.use_srcs:
|
if self.use_srcs:
|
||||||
for s in name.get_source_references():
|
for s in name.get_source_references():
|
||||||
@ -463,7 +464,7 @@ class IndivCompleteReport(Report):
|
|||||||
if father_inst_id:
|
if father_inst_id:
|
||||||
father_inst = self.database.get_person_from_handle(
|
father_inst = self.database.get_person_from_handle(
|
||||||
father_inst_id)
|
father_inst_id)
|
||||||
father = father_inst.get_primary_name().get_regular_name()
|
father = _nd.display(father_inst)
|
||||||
fmark = ReportUtils.get_person_mark(self.database,father_inst)
|
fmark = ReportUtils.get_person_mark(self.database,father_inst)
|
||||||
else:
|
else:
|
||||||
father = ""
|
father = ""
|
||||||
@ -472,7 +473,7 @@ class IndivCompleteReport(Report):
|
|||||||
if mother_inst_id:
|
if mother_inst_id:
|
||||||
mother_inst = self.database.get_person_from_handle(
|
mother_inst = self.database.get_person_from_handle(
|
||||||
mother_inst_id)
|
mother_inst_id)
|
||||||
mother = mother_inst.get_primary_name().get_regular_name()
|
mother = _nd.display(mother_inst)
|
||||||
mmark = ReportUtils.get_person_mark(self.database,mother_inst)
|
mmark = ReportUtils.get_person_mark(self.database,mother_inst)
|
||||||
else:
|
else:
|
||||||
mother = ""
|
mother = ""
|
||||||
@ -538,7 +539,7 @@ class IndivCompleteOptions(ReportOptions):
|
|||||||
def get_report_filters(self,person):
|
def get_report_filters(self,person):
|
||||||
"""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 = _nd.display(person)
|
||||||
gramps_id = person.get_gramps_id()
|
gramps_id = person.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
name = 'PERSON'
|
name = 'PERSON'
|
||||||
|
Loading…
Reference in New Issue
Block a user