* src/RelLib.py (NoteBase,PlaceBase): Add new classes.

* src/ReadGedcom.py: Use get_note for comments.
* src/ReadXML.py: Use get_note for comments.
* src/Sources.py: Use get_note for comments.
* src/WriteGedcom.py: Use get_note for comments.
* src/WriteXML.py: Use get_note for comments.
* src/plugins/Ancestors.py: Use get_note for comments.
* src/plugins/FtmStyleAncestors.py: Use get_note for comments.
* src/plugins/FtmStyleDescendants.py: Use get_note for comments.
* src/plugins/NavWebPage.py: Use get_note for comments.
* src/plugins/ScratchPad.py: Use get_note for comments.
* src/plugins/WebPage.py: Use get_note for comments.


svn: r4246
This commit is contained in:
Alex Roitman
2005-03-28 04:58:28 +00:00
parent 76095fbc96
commit b3fa7d644d
13 changed files with 218 additions and 229 deletions

View File

@@ -624,7 +624,7 @@ class ComprehensiveAncestorsReport (Report.Report):
ind = len (self.sources)
citation += "[%d" % ind
comments = ref.get_comments ()
comments = ref.get_note ()
if comments and comments.find ('\n') == -1:
citation += " - %s" % comments.rstrip ('.')

View File

@@ -164,7 +164,7 @@ class FtmAncestorReport(Report.Report):
self.doc.write_text(' ')
self.doc.write_text(item)
item = srcref.get_comments()
item = srcref.get_note()
if item:
self.doc.write_text('; ')
self.doc.write_text(_('Comments:'))

View File

@@ -194,7 +194,7 @@ class FtmDescendantReport(Report.Report):
self.doc.write_text(' ')
self.doc.write_text(item)
item = srcref.get_comments()
item = srcref.get_note()
if item:
self.doc.write_text('; ')
self.doc.write_text(_('Comments:'))

View File

@@ -72,7 +72,7 @@ _css = [
'TD {\nvertical-align: top;\n}',
'H1 {',
'font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;',
'font-weight: bolder;\nfont-size: 160%;\nmargin: 2px;\n}\n',
'font-weight: bolder;\nfont-size: 160%;\nmargin: 2px;\n}\n',
'H2 {',
'font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;',
'font-weight: bolder;\nfont-style: italic;\nfont-size: 150%;\n}',
@@ -82,7 +82,7 @@ _css = [
'padding-left: 4px;\nbackground-color: #667;\ncolor: #fff;\n}',
'H5 {\nmargin-bottom: 0.5em;\n}',
'H6 {\nfont-weight: normal;\nfont-style: italic;',
'font-size: 100%;\nmargin-left: 1em;\nmargin-top: 1.3em;',
'font-size: 100%;\nmargin-left: 1em;\nmargin-top: 1.3em;',
'margin-bottom: 0.8em;\n}',
'HR {\nheight: 0;\nwidth: 0;\nmargin: 0;\nmargin-top: 1px;',
'margin-bottom: 1px;\npadding: 0;\nborder-top: 0;',
@@ -132,10 +132,10 @@ class BasePage:
return text.replace(' ','%20')
def display_footer(self,of):
of.write('<br>\n')
of.write('<br>\n')
of.write('<hr>\n')
of.write('<div class="footer">Generated by ')
of.write('<br>\n')
of.write('<br>\n')
of.write('<hr>\n')
of.write('<div class="footer">Generated by ')
of.write('<a href="http://gramps.sourceforge.net">GRAMPS</a> ')
of.write('on 13 December 2004.')
of.write('</div>\n')
@@ -146,15 +146,15 @@ class BasePage:
of.write('<!DOCTYPE HTML PUBLIC ')
of.write('"-//W3C//DTD HTML 4.01 Transitional//EN">\n')
of.write('<html>\n<head>\n')
of.write('<title>%s</title>\n' % self.title_str)
of.write('<meta http-equiv="Content-Type" content="text/html; ')
of.write('<title>%s</title>\n' % self.title_str)
of.write('<meta http-equiv="Content-Type" content="text/html; ')
of.write('charset=ISO-8859-1">\n')
of.write('<link href="%s" ' % _NARRATIVE)
of.write('<link href="%s" ' % _NARRATIVE)
of.write('rel="stylesheet" type="text/css">\n')
of.write('<link href="favicon.png" rel="Shortcut Icon">\n')
of.write('<link href="favicon.png" rel="Shortcut Icon">\n')
of.write('</head>\n')
of.write('<body>\n')
of.write('<div class="navheader">\n')
of.write('<div class="navheader">\n')
of.write(' <div class="navbyline">By: %s</div>\n' % author)
of.write(' <h1 class="navtitle">%s</h1>\n' % self.title_str)
of.write(' <hr>\n')
@@ -168,7 +168,7 @@ class BasePage:
of.write(' <a href="download.html">Download</a> &nbsp;\n')
of.write(' <a href="contact.html">Contact</a> &nbsp;\n')
of.write(' </div>\n')
of.write(' </div>\n')
of.write(' </div>\n')
#------------------------------------------------------------------------
#
@@ -185,12 +185,12 @@ class IndividualListPage(BasePage):
self.display_header(of,_('Individuals'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Individuals'))
of.write('<h3>%s</h3>\n' % _('Individuals'))
of.write('<p>%s</p>\n' % _('Index of individuals, sorted by last name.'))
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u><b>%s</b></u></td>\n' % _('Surname'))
of.write('<tr><td class="field"><u><b>%s</b></u></td>\n' % _('Surname'))
of.write('<td class="field"><u><b>%s</b></u></td>\n' % _('Name'))
of.write('</tr>\n')
@@ -234,14 +234,14 @@ class PlaceListPage(BasePage):
self.display_header(of,_('Places'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Places'))
of.write('<h3>%s</h3>\n' % _('Places'))
of.write('<p>%s</p>\n' % _('Index of all the places in the '
'project.'))
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u>')
of.write('<tr><td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Letter'))
of.write('<td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Place'))
@@ -297,16 +297,16 @@ class SurnameListPage(BasePage):
self.display_header(of,_('Surnames'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Surnames'))
of.write('<h3>%s</h3>\n' % _('Surnames'))
of.write('<p>%s</p>\n' % _('Index of all the surnames in the '
'project. The links lead to a list '
'of individuals in the database with '
'this same surname.'))
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u>')
of.write('<tr><td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Letter'))
of.write('<td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Surname'))
@@ -359,7 +359,7 @@ class IntroductionPage(BasePage):
self.display_header(of,_('Introduction'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Introduction'))
of.write('<h3>%s</h3>\n' % _('Introduction'))
if note_id:
obj = db.get_object_from_gramps_id(note_id)
@@ -393,7 +393,7 @@ class HomePage(BasePage):
self.display_header(of,_('Home'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Home'))
of.write('<h3>%s</h3>\n' % _('Home'))
if note_id:
obj = db.get_object_from_gramps_id(note_id)
@@ -440,8 +440,8 @@ class SourcesPage(BasePage):
handle_list = list(handle_set)
of.write('<h3>%s</h3>\n<p>' % _('Sources'))
of.write(_('All sources cited in the project.'))
of.write('<h3>%s</h3>\n<p>' % _('Sources'))
of.write(_('All sources cited in the project.'))
of.write('</p>\n<blockquote>\n<table class="infolist">\n')
index = 1
@@ -470,7 +470,7 @@ class DownloadPage(BasePage):
self.display_header(of,_('Download'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Download'))
of.write('<h3>%s</h3>\n' % _('Download'))
self.display_footer(of)
of.close()
@@ -490,7 +490,7 @@ class ContactPage(BasePage):
self.display_header(of,_('Contact'),
db.get_researcher().get_name())
of.write('<h3>%s</h3>\n' % _('Contact'))
of.write('<h3>%s</h3>\n' % _('Contact'))
self.display_footer(of)
of.close()
@@ -536,9 +536,9 @@ class IndividualPage(BasePage):
sreflist = self.person.get_source_references()
if not sreflist:
return
of.write('<h4>%s</h4>\n' % _('Sources'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('<h4>%s</h4>\n' % _('Sources'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
index = 1
@@ -562,7 +562,7 @@ class IndividualPage(BasePage):
values.append(date)
of.write(', '.join(values))
of.write('</td></tr>\n')
of.write('</table>\n')
of.write('</table>\n')
def display_ind_pedigree(self,of):
@@ -580,8 +580,8 @@ class IndividualPage(BasePage):
mother = None
of.write('<h4>%s</h4>\n' % _('Pedigree'))
of.write('<hr>\n<br>\n')
of.write('<table class="pedigree">\n')
of.write('<hr>\n<br>\n')
of.write('<table class="pedigree">\n')
of.write('<tr><td>\n')
if father or mother:
of.write('<blockquote class="pedigreeind">\n')
@@ -622,7 +622,7 @@ class IndividualPage(BasePage):
of.write('height="100"></a>')
of.write('</div>\n')
of.write('<div class="summaryarea">\n')
of.write('<div class="summaryarea">\n')
of.write('<h3>%s</h3>\n' % self.sort_name)
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
@@ -650,12 +650,12 @@ class IndividualPage(BasePage):
of.write('</tr>\n')
of.write('</table>\n')
of.write('</div>\n')
of.write('</div>\n')
def display_ind_events(self,of):
of.write('<h4>%s</h4>\n' % _('Events'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('<h4>%s</h4>\n' % _('Events'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
for event_id in self.person.get_event_list():
@@ -667,11 +667,11 @@ class IndividualPage(BasePage):
of.write('</td>\n')
of.write('</tr>\n')
of.write('</table>\n')
of.write('</table>\n')
def display_ind_narrative(self,of):
of.write('<h4>%s</h4>\n' % _('Narrative'))
of.write('<hr>\n')
of.write('<h4>%s</h4>\n' % _('Narrative'))
of.write('<hr>\n')
noteobj = self.person.get_note_object()
if noteobj:
@@ -703,9 +703,9 @@ class IndividualPage(BasePage):
if not parent_list and not family_list:
return
of.write('<h4>%s</h4>\n' % _("Relationships"))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('<h4>%s</h4>\n' % _("Relationships"))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
if parent_list:
@@ -747,7 +747,7 @@ class IndividualPage(BasePage):
of.write('</a>\n')
of.write("<br>\n")
of.write('</td>\n</tr>\n')
of.write('</table>\n')
of.write('</table>\n')
def display_spouse(self,of,family,first=True):
gender = self.person.get_gender()

View File

@@ -421,7 +421,7 @@ class ScratchPadWindow:
_("Title"),escape(base.get_title()),
_("Page"), escape(srcref.get_page()),
_("Text"), escape(srcref.get_text()),
_("Comment"), escape(srcref.get_comments()))
_("Comment"), escape(srcref.get_note()))
return s

View File

@@ -237,7 +237,7 @@ class IndividualPage:
self.write_info(sref.get_page())
if self.usecomments:
self.write_info(sref.get_text())
self.write_info(sref.get_comments())
self.write_info(sref.get_note())
self.doc.end_paragraph()
def write_info(self,info):