2006-11-01 Don Allingham <don@gramps-project.org>

* src/plugins/DescendReport.py: handle exceeding the max generations



svn: r7538
This commit is contained in:
Don Allingham 2006-11-02 03:34:16 +00:00
parent 780a653eb6
commit a22f2fd5a7
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
2006-11-01 Don Allingham <don@gramps-project.org>
* src/plugins/DescendReport.py: handle exceeding the max generations
2006-11-01 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2006-11-01 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/ScratchPad.py: Fix signal connection and dbstate vs. db confusion; * src/ScratchPad.py: Fix signal connection and dbstate vs. db confusion;
Add more checks for is_valid; This should now remove stale objects on Add more checks for is_valid; This should now remove stale objects on

View File

@ -158,7 +158,7 @@ class DescendantReport(Report):
def dump(self,level,person): def dump(self,level,person):
self.doc.start_paragraph("DR-Level%d" % level,"%d." % level) self.doc.start_paragraph("DR-Level%d" % min(level,32),"%d." % level)
mark = ReportUtils.get_person_mark(self.database,person) mark = ReportUtils.get_person_mark(self.database,person)
self.doc.write_text(NameDisplay.displayer.display(person),mark) self.doc.write_text(NameDisplay.displayer.display(person),mark)
self.dump_dates(person) self.dump_dates(person)
@ -174,7 +174,7 @@ class DescendantReport(Report):
if spouse_handle: if spouse_handle:
spouse = self.database.get_person_from_handle(spouse_handle) spouse = self.database.get_person_from_handle(spouse_handle)
mark = ReportUtils.get_person_mark(self.database,person) mark = ReportUtils.get_person_mark(self.database,person)
self.doc.start_paragraph("DR-Spouse%d" % level) self.doc.start_paragraph("DR-Spouse%d" % min(level,32))
name = NameDisplay.displayer.display(spouse) name = NameDisplay.displayer.display(spouse)
self.doc.write_text(_("sp. %(spouse)s") % {'spouse':name},mark) self.doc.write_text(_("sp. %(spouse)s") % {'spouse':name},mark)
self.dump_dates(spouse) self.dump_dates(spouse)
@ -224,7 +224,7 @@ class DescendantOptions(ReportOptions):
f = BaseDoc.FontStyle() f = BaseDoc.FontStyle()
f.set_size(10) f.set_size(10)
for i in range(1,32): for i in range(1,33):
p = BaseDoc.ParagraphStyle() p = BaseDoc.ParagraphStyle()
p.set_font(f) p.set_font(f)
p.set_top_margin(ReportUtils.pt2cm(f.get_size()*0.125)) p.set_top_margin(ReportUtils.pt2cm(f.get_size()*0.125))
@ -233,7 +233,7 @@ class DescendantOptions(ReportOptions):
p.set_left_margin(min(10.0,float(i-0.5))) p.set_left_margin(min(10.0,float(i-0.5)))
p.set_description(_("The style used for the " p.set_description(_("The style used for the "
"level %d display.") % i) "level %d display.") % i)
default_style.add_style("DR-Level%d" % i,p) default_style.add_style("DR-Level%d" % min(i,32), p)
p = BaseDoc.ParagraphStyle() p = BaseDoc.ParagraphStyle()
p.set_font(f) p.set_font(f)
@ -242,7 +242,7 @@ class DescendantOptions(ReportOptions):
p.set_left_margin(min(10.0,float(i-0.5))) p.set_left_margin(min(10.0,float(i-0.5)))
p.set_description(_("The style used for the " p.set_description(_("The style used for the "
"spouse level %d display.") % i) "spouse level %d display.") % i)
default_style.add_style("DR-Spouse%d" % i,p) default_style.add_style("DR-Spouse%d" % min(i,32), p)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #