diff --git a/src/gen/plug/report/endnotes.py b/src/gen/plug/report/endnotes.py index a873ab642..20e15e181 100644 --- a/src/gen/plug/report/endnotes.py +++ b/src/gen/plug/report/endnotes.py @@ -5,6 +5,7 @@ # Copyright (C) 2010 Peter Landgren # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Adam Stein +# Copyright (C) 2011 Tim G Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -76,7 +77,7 @@ def add_endnote_styles(style_sheet): para.set_description(_('The basic style used for the endnotes reference notes display.')) style_sheet.add_paragraph_style("Endnotes-Ref-Notes", para) -def cite_source(bibliography, obj): +def cite_source(bibliography, database, obj): """ Cite any sources for the object and add them to the bibliography. @@ -86,14 +87,15 @@ def cite_source(bibliography, obj): @type obj: L{gen.lib.srcbase} """ txt = "" - slist = obj.get_source_references() + slist = obj.get_citation_list() if slist: first = 1 for ref in slist: if not first: txt += ', ' first = 0 - (cindex, key) = bibliography.add_reference(ref) + citation = database.get_citation_from_handle(ref) + (cindex, key) = bibliography.add_reference(citation) txt += "%d" % (cindex + 1) if key is not None: txt += key diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/DetAncestralReport.py index e19a5ed6f..87a48a792 100644 --- a/src/plugins/textreport/DetAncestralReport.py +++ b/src/plugins/textreport/DetAncestralReport.py @@ -8,6 +8,7 @@ # Copyright (C) 2009 Benny Malengier # Copyright (C) 2010 Jakim Friant # Copyright (C) 2010 Vlada Peri\u0107 +# Copyright (C) 2011 Tim G Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -696,7 +697,7 @@ class DetAncestorReport(Report): if not obj or not self.inc_sources: return "" - txt = endnotes.cite_source(self.bibli, obj) + txt = endnotes.cite_source(self.bibli, self.database, obj) if txt: txt = '' + txt + '' return txt diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/DetDescendantReport.py index beffa423d..465ade24c 100644 --- a/src/plugins/textreport/DetDescendantReport.py +++ b/src/plugins/textreport/DetDescendantReport.py @@ -10,6 +10,7 @@ # Copyright (C) 2010 Jakim Friant # Copyright (C) 2010 Vlada Peri\u0107 # Copyright (C) 2011 Matt Keenan +# Copyright (C) 2011 Tim G Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -858,7 +859,7 @@ class DetDescendantReport(Report): if not obj or not self.inc_sources: return "" - txt = endnotes.cite_source(self.bibli, obj) + txt = endnotes.cite_source(self.bibli, self.database, obj) if txt: txt = '' + txt + '' return txt diff --git a/src/plugins/textreport/IndivComplete.py b/src/plugins/textreport/IndivComplete.py index 871703fbb..cac4c076e 100644 --- a/src/plugins/textreport/IndivComplete.py +++ b/src/plugins/textreport/IndivComplete.py @@ -6,6 +6,7 @@ # Copyright (C) 2009 Nick Hall # Copyright (C) 2009 Benny Malengier # Copyright (C) 2010 Jakim Friant +# Copyright (C) 2011 Tim G Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -219,7 +220,7 @@ class IndivCompleteReport(Report): endnotes = "" if self.use_srcs: - endnotes = Endnotes.cite_source(self.bibli, event) + endnotes = Endnotes.cite_source(self.bibli, self.database, event) self.doc.start_row() self.normal_cell(column_1) @@ -359,7 +360,7 @@ class IndivCompleteReport(Report): text = self._name_display.display_name(name) endnotes = "" if self.use_srcs: - endnotes = Endnotes.cite_source(self.bibli, name) + endnotes = Endnotes.cite_source(self.bibli, self.database, name) self.normal_cell(text, endnotes) self.doc.end_row() self.doc.end_table() @@ -387,7 +388,7 @@ class IndivCompleteReport(Report): date = DateHandler.get_date(addr) endnotes = "" if self.use_srcs: - endnotes = Endnotes.cite_source(self.bibli, addr) + endnotes = Endnotes.cite_source(self.bibli, self.database, addr) self.doc.start_row() self.normal_cell(date) self.normal_cell(text, endnotes) @@ -579,7 +580,7 @@ class IndivCompleteReport(Report): mark = ReportUtils.get_person_mark(self.database, self.person) endnotes = "" if self.use_srcs: - endnotes = Endnotes.cite_source(self.bibli, name) + endnotes = Endnotes.cite_source(self.bibli, self.database, name) self.normal_cell(text, endnotes, mark) self.doc.end_row()