diff --git a/ChangeLog b/ChangeLog index e5b7a9fbf..6ebc98d75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-27 Brian Matherly + * src/plugins/NarrativeWeb.py: + Cleanup. + 2008-02-28 Jim Sack * src/GrampsDbUtils/_GedcomParse.py minor: remove redundant counting of errors dating to r8912 patch, I think. I don't believe diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index beceacd94..27859ca55 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -528,15 +528,15 @@ class BasePage: of.write('\n') of.write('\n') - def display_source_refs(self, of, db): - if self.bibli.get_citation_count() == 0: + def display_source_refs(self, of, db, bibli): + if bibli.get_citation_count() == 0: return of.write('
\n') of.write('

%s

\n' % _('Source References')) of.write('\n') cindex = 0 - for citation in self.bibli.get_citation_list(): + for citation in bibli.get_citation_list(): cindex += 1 # Add this source to the global list of sources to be displayed # on each source page. @@ -549,35 +549,35 @@ class BasePage: self.src_list[shandle] = [lnk] # Add this source and its references to the page - source = self.db.get_source_from_handle(shandle) + source = db.get_source_from_handle(shandle) title = source.get_title() of.write('' % (cindex,cindex)) + of.write('%d.' % (cindex, cindex)) of.write('\n') - for key,sref in citation.get_ref_list(): + for key, sref in citation.get_ref_list(): tmp = [] confidence = Utils.confidence.get(sref.confidence, _('Unknown')) if confidence == _('Normal'): confidence = None - for (label,data) in [(_('Date'),_dd.display(sref.date)), - (_('Page'),sref.page), - (_('Confidence'),confidence)]: + for (label, data) in [(_('Date'), _dd.display(sref.date)), + (_('Page'), sref.page), + (_('Confidence'), confidence)]: if data: - tmp.append("%s: %s" % (label,data)) + tmp.append("%s: %s" % (label, data)) notelist = sref.get_note_list() for notehandle in notelist: - note = self.db.get_note_from_handle(notehandle) + note = db.get_note_from_handle(notehandle) tmp.append("%s: %s" % (_('Text'), note.get(True))) if len(tmp) > 0: of.write('\t') of.write('' % (cindex,key)) + of.write('' % (cindex, key)) + of.write('%d%s.' % (cindex, key)) of.write('
') - of.write('%d.') - self.source_link(of,source.handle,title,source.gramps_id,True) + self.source_link(of, source.handle, title, source.gramps_id, True) of.write('

') of.write('

') - of.write('' % (cindex,key)) - of.write('%d%s.') of.write('
'.join(tmp)) of.write('

') @@ -1217,7 +1217,7 @@ class MediaPage(BasePage): self.bibli = Bibliography() for sref in photo.get_source_references(): self.bibli.add_reference(sref) - self.display_source_refs(of, db) + self.display_source_refs(of, db, self.bibli) def display_attr_list(self, of,attrlist=None): if not attrlist: @@ -1883,7 +1883,7 @@ class IndividualPage(BasePage): self.bibli.add_reference(sref) if self.bibli.get_citation_count() == 0: return - self.display_source_refs(of, self.db) + self.display_source_refs(of, self.db, self.bibli) def display_ind_pedigree(self, of):