srcreflist bug fixes in WebPage

svn: r468
This commit is contained in:
Don Allingham 2001-10-14 14:24:10 +00:00
parent 5afe6b2418
commit c8ae444dcc
2 changed files with 24 additions and 11 deletions

View File

@ -264,6 +264,18 @@
<label>P_laces</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>media1</name>
<signal>
<name>activate</name>
<handler>on_media_activate</handler>
<last_modification_time>Sun, 14 Oct 2001 14:12:22 GMT</last_modification_time>
</signal>
<label>_Media</label>
<right_justify>False</right_justify>
</widget>
</widget>
</widget>
@ -610,14 +622,13 @@
<class>GtkNotebook</class>
<child_name>GnomeDock:contents</child_name>
<name>notebook1</name>
<can_focus>True</can_focus>
<signal>
<name>switch_page</name>
<handler>on_notebook1_switch_page</handler>
<after>True</after>
<last_modification_time>Fri, 20 Oct 2000 01:16:41 GMT</last_modification_time>
</signal>
<show_tabs>True</show_tabs>
<show_tabs>False</show_tabs>
<show_border>True</show_border>
<tab_pos>GTK_POS_TOP</tab_pos>
<scrollable>False</scrollable>

View File

@ -120,7 +120,7 @@ class IndividualPage:
#
#
#--------------------------------------------------------------------
def write_normal_row(self,label,data,sref):
def write_normal_row(self,label,data,sreflist):
self.doc.start_row()
self.doc.start_cell("NormalCell")
self.doc.start_paragraph("Label")
@ -131,12 +131,13 @@ class IndividualPage:
self.doc.start_cell("NormalCell")
self.doc.start_paragraph("Data")
self.doc.write_text(data)
for sref in srefllist:
self.doc.start_link("#s%d" % self.scnt)
self.doc.write_text("<SUP>%d</SUP>" % self.scnt)
self.doc.end_link()
self.scnt = self.scnt + 1
self.slist.append(sref)
if sreflist:
for sref in sreflist:
self.doc.start_link("#s%d" % self.scnt)
self.doc.write_text("<SUP>%d</SUP>" % self.scnt)
self.doc.end_link()
self.scnt = self.scnt + 1
self.slist.append(sref)
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
@ -238,7 +239,8 @@ class IndividualPage:
self.doc.end_paragraph()
if self.photos and len(photo_list) > 0:
file = photo_list[0].getPath()
object = photo_list[0].getReference()
file = object.getPath()
self.doc.start_paragraph("Data")
self.doc.add_photo(file,4.0,4.0)
self.doc.end_paragraph()
@ -308,7 +310,7 @@ class IndividualPage:
place = event.getPlaceName()
srcref = event.getSourceRefList()
if date == "" and descr == "" and place == "" and srcref.getBase() == None:
if date == "" and descr == "" and place == "" and len(srcref) == 0:
continue
if count == 0: