From 4de76df6f62c556cea6f3f3967f993d0317d1cc5 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 13 Jul 2003 00:09:29 +0000 Subject: [PATCH] * src/plugins/BookReport.py (BookReportDialog.make_document): Move item initialization here (was in make_report). * src/plugins/DetDescendantReport.py: Remove empty setup(). * src/plugins/AncestorReport.py: Likewise. * src/plugins/Ancestors.py: Likewise. * src/plugins/DescendReport.py: Likewise. * src/plugins/FtmStyleAncestors.py: Likewise. * src/plugins/FamilyGroup.py: Likewise. * src/plugins/DetAncestralReport.py: Likewise. svn: r1874 --- ChangeLog | 11 +++++++++++ src/plugins/AncestorReport.py | 3 --- src/plugins/Ancestors.py | 3 --- src/plugins/BookReport.py | 22 ++++++++++------------ src/plugins/DescendReport.py | 3 --- src/plugins/DetAncestralReport.py | 3 --- src/plugins/DetDescendantReport.py | 2 -- src/plugins/FamilyGroup.py | 3 --- src/plugins/FtmStyleAncestors.py | 3 --- 9 files changed, 21 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac266d60e..f9efca7f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,17 @@ 2003-07-12 Alex Roitman * src/Plugins.py (PluginDialog.build_tree): Remove reverse() call. * doc/gramps-manual/C/gramps-manual.xml: More corrections. + * src/plugins/BookReport.py (BookReportDialog.make_document): + Move item initialization here (was in make_report). + This is necessary to define all the styles, including non-paragraph + ones, before opening single book doc. + * src/plugins/DetDescendantReport.py: Remove empty setup(). + * src/plugins/AncestorReport.py: Likewise. + * src/plugins/Ancestors.py: Likewise. + * src/plugins/DescendReport.py: Likewise. + * src/plugins/FtmStyleAncestors.py: Likewise. + * src/plugins/FamilyGroup.py: Likewise. + * src/plugins/DetAncestralReport.py: Likewise. 2003-07-11 Alex Roitman * src/plugins/IndivSummary.py (IndivSummary.__init__): diff --git a/src/plugins/AncestorReport.py b/src/plugins/AncestorReport.py index a3f531229..97892173c 100644 --- a/src/plugins/AncestorReport.py +++ b/src/plugins/AncestorReport.py @@ -61,9 +61,6 @@ class AncestorReport(Report.Report): else: self.standalone = 0 - def setup(self): - pass - def filter(self,person,index,generation=1): if person == None or generation >= self.max_generations: return diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index fd7ea7e3c..3ae7a1d94 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -105,9 +105,6 @@ class AncestorsReport (Report.Report): else: self.standalone = 0 - def setup(self): - pass - def write_report(self): if self.newpage: self.doc.page_break() diff --git a/src/plugins/BookReport.py b/src/plugins/BookReport.py index 94f161827..1c225622d 100644 --- a/src/plugins/BookReport.py +++ b/src/plugins/BookReport.py @@ -864,26 +864,24 @@ class BookReportDialog(Report.ReportDialog): """Create a document of the type requested by the user.""" self.doc = self.format(self.selected_style,self.paper, self.template_name,self.orien) - self.doc.open(self.target_path) - def make_report(self): - """The actual book report. Start it out, then go through the item list - and call each item's write_book_item method.""" - - rptlist = [] - + self.rptlist = [] newpage = 0 for item in self.book.get_item_list(): write_book_item = item.get_write_item() options = item.get_options() if write_book_item: obj = write_book_item(self.database,self.person, - self.doc,options,newpage) - obj.setup() - rptlist.append(obj) + self.doc,options,newpage) + self.rptlist.append(obj) newpage = 1 - - for item in rptlist: + self.doc.open(self.target_path) + + def make_report(self): + """The actual book report. Start it out, then go through the item list + and call each item's write_book_item method.""" + + for item in self.rptlist: item.write_report() self.doc.close() diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index 8c85c0cea..e94359f2c 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -69,9 +69,6 @@ class DescendantReport: else: self.standalone = 0 - def setup(self): - pass - def dump_dates(self, person): birth = person.getBirth().getDateObj().get_start_date() death = person.getDeath().getDateObj().get_start_date() diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 4ea9e3df0..d669596ba 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -68,9 +68,6 @@ class DetAncestorReport(Report.Report): else: self.standalone = 0 - def setup(self): - pass - #-------------------------------------------------------------------- # # diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 10767bdcc..95ed493ac 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -69,8 +69,6 @@ class DetDescendantReport(Report.Report): else: self.standalone = 0 - def setup(self): - pass #-------------------------------------------------------------------- # # diff --git a/src/plugins/FamilyGroup.py b/src/plugins/FamilyGroup.py index da66e843b..67b34d684 100644 --- a/src/plugins/FamilyGroup.py +++ b/src/plugins/FamilyGroup.py @@ -119,9 +119,6 @@ class FamilyGroup: table.set_column_width(3,40) self.doc.add_table_style('ChildTable',table) - def setup(self): - pass - def end(self): if self.standalone: self.doc.close() diff --git a/src/plugins/FtmStyleAncestors.py b/src/plugins/FtmStyleAncestors.py index 38835427b..eeb171523 100644 --- a/src/plugins/FtmStyleAncestors.py +++ b/src/plugins/FtmStyleAncestors.py @@ -62,9 +62,6 @@ class FtmAncestorReport(Report.Report): self.sref_map = {} self.sref_index = 1 - def setup(self): - pass - def apply_filter(self,person,index,generation=1): if person == None or generation > self.max_generations: return