* src/Utils.py: grab the first word of a command line string
* src/plugins/DetAncestralReport.py: work on spouse information svn: r5266
This commit is contained in:
parent
569af0f288
commit
054a803b86
@ -1,3 +1,7 @@
|
|||||||
|
2005-10-03 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Utils.py: grab the first word of a command line string
|
||||||
|
* src/plugins/DetAncestralReport.py: work on spouse information
|
||||||
|
|
||||||
2005-10-02 Don Allingham <don@gramps-project.org>
|
2005-10-02 Don Allingham <don@gramps-project.org>
|
||||||
* src/ReportUtils.py: add pronoun/name support to child strings
|
* src/ReportUtils.py: add pronoun/name support to child strings
|
||||||
* src/plugin/DetAncestralReport.py: Add support for ReportUtils
|
* src/plugin/DetAncestralReport.py: Add support for ReportUtils
|
||||||
|
@ -388,6 +388,7 @@ def gformat(val):
|
|||||||
return return_val.replace(decimal_point,'.')
|
return return_val.replace(decimal_point,'.')
|
||||||
|
|
||||||
def search_for(name):
|
def search_for(name):
|
||||||
|
name = name.split()[0]
|
||||||
for i in os.environ['PATH'].split(':'):
|
for i in os.environ['PATH'].split(':'):
|
||||||
fname = os.path.join(i,name)
|
fname = os.path.join(i,name)
|
||||||
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
|
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
|
||||||
|
@ -406,14 +406,14 @@ class DetAncestorReport(Report.Report):
|
|||||||
ind_handle = None
|
ind_handle = None
|
||||||
if mate.get_gender() == RelLib.Person.MALE:
|
if mate.get_gender() == RelLib.Person.MALE:
|
||||||
ind_handle = family.get_mother_handle()
|
ind_handle = family.get_mother_handle()
|
||||||
heshe = 0
|
|
||||||
else:
|
else:
|
||||||
heshe = 0
|
|
||||||
ind_handle = family.get_father_handle()
|
ind_handle = family.get_father_handle()
|
||||||
if ind_handle:
|
if ind_handle:
|
||||||
ind = self.database.get_person_from_handle(ind_handle)
|
ind = self.database.get_person_from_handle(ind_handle)
|
||||||
person_name = _nd.display(ind)
|
person_name = _nd.display(ind)
|
||||||
firstName = ind.get_primary_name().get_first_name()
|
firstName = ind.get_primary_name().get_first_name()
|
||||||
|
else:
|
||||||
|
firstName = 0
|
||||||
|
|
||||||
if person_name:
|
if person_name:
|
||||||
if self.addImages:
|
if self.addImages:
|
||||||
@ -421,9 +421,6 @@ class DetAncestorReport(Report.Report):
|
|||||||
|
|
||||||
self.doc.start_paragraph("DAR-Entry")
|
self.doc.start_paragraph("DAR-Entry")
|
||||||
|
|
||||||
if not self.firstName:
|
|
||||||
firstName = heshe
|
|
||||||
|
|
||||||
self.doc.write_text(person_name)
|
self.doc.write_text(person_name)
|
||||||
|
|
||||||
text = ReportUtils.born_str(self.database,ind,"",
|
text = ReportUtils.born_str(self.database,ind,"",
|
||||||
@ -432,12 +429,12 @@ class DetAncestorReport(Report.Report):
|
|||||||
self.doc.write_text(text)
|
self.doc.write_text(text)
|
||||||
|
|
||||||
age,units = self.calc_age(ind)
|
age,units = self.calc_age(ind)
|
||||||
text = ReportUtils.died_str(self.database,ind,heshe,
|
text = ReportUtils.died_str(self.database,ind,0,
|
||||||
self.EMPTY_DATE,self.EMPTY_PLACE,age,units)
|
self.EMPTY_DATE,self.EMPTY_PLACE,age,units)
|
||||||
if text:
|
if text:
|
||||||
self.doc.write_text(text)
|
self.doc.write_text(text)
|
||||||
|
|
||||||
text = ReportUtils.buried_str(self.database,ind,heshe,
|
text = ReportUtils.buried_str(self.database,ind,0,
|
||||||
self.EMPTY_DATE,self.EMPTY_PLACE)
|
self.EMPTY_DATE,self.EMPTY_PLACE)
|
||||||
if text:
|
if text:
|
||||||
self.doc.write_text(text)
|
self.doc.write_text(text)
|
||||||
@ -446,8 +443,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
|
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
if self.listChildren \
|
if self.listChildren and mate.get_gender()==RelLib.Person.MALE:
|
||||||
and mate.get_gender() == RelLib.Person.MALE:
|
|
||||||
self.write_children(family)
|
self.write_children(family)
|
||||||
|
|
||||||
def calc_age(self,ind):
|
def calc_age(self,ind):
|
||||||
@ -660,7 +656,7 @@ class DetAncestorOptions(ReportOptions.ReportOptions):
|
|||||||
default_style.add_style("DAR-NoteHeader",para)
|
default_style.add_style("DAR-NoteHeader",para)
|
||||||
|
|
||||||
para = BaseDoc.ParagraphStyle()
|
para = BaseDoc.ParagraphStyle()
|
||||||
para.set(first_indent=0.5,lmargin=1.0,pad=0.25)
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("DAR-Entry",para)
|
default_style.add_style("DAR-Entry",para)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user