2003-06-21 Tim Waugh <twaugh@redhat.com>

* src/plugins/Ancestors.py: Better handling of missing photos.


svn: r1767
This commit is contained in:
Tim Waugh 2003-06-21 08:57:35 +00:00
parent 36d34ce5c8
commit a63e16d2bd
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,5 @@
2003-06-21 Tim Waugh <twaugh@redhat.com> 2003-06-21 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py: Better handling of missing photos.
* src/plugins/Ancestors.py (event_info): Better handling of strings. * src/plugins/Ancestors.py (event_info): Better handling of strings.
* src/plugins/Ancestors.py (person_name): Handle titles and suffices. * src/plugins/Ancestors.py (person_name): Handle titles and suffices.

View File

@ -72,6 +72,14 @@ class AncestorsReport (Report.Report):
cell.set_padding (1) # each side makes 2cm, the size of the photo cell.set_padding (1) # each side makes 2cm, the size of the photo
doc.add_cell_style ("PaddedCell", cell) doc.add_cell_style ("PaddedCell", cell)
cell = TextDoc.TableCellStyle ()
cell.set_padding (1) # each side makes 2cm, the size of the photo
cell.set_left_border (1)
cell.set_top_border (1)
cell.set_right_border (1)
cell.set_bottom_border (1)
doc.add_cell_style ("NoPhoto", cell)
cell = TextDoc.TableCellStyle () cell = TextDoc.TableCellStyle ()
doc.add_cell_style ("Photo", cell) doc.add_cell_style ("Photo", cell)
@ -257,7 +265,7 @@ class AncestorsReport (Report.Report):
ret.append ((self.doc.end_cell, [])) ret.append ((self.doc.end_cell, []))
if len (photos) == 0: if len (photos) == 0:
ret.append ((self.doc.start_cell, ["PaddedCell"])) ret.append ((self.doc.start_cell, ["NoPhoto"]))
ret.append ((self.doc.end_cell, [])) ret.append ((self.doc.end_cell, []))
else: else:
ret.append ((self.doc.start_cell, ["Photo"])) ret.append ((self.doc.start_cell, ["Photo"]))