Fixed several webpage and report generation problems

svn: r1259
This commit is contained in:
Don Allingham 2003-01-19 06:46:45 +00:00
parent a9f8fe034f
commit eea72f5ac1
3 changed files with 12 additions and 12 deletions

View File

@ -158,13 +158,13 @@ class Report:
self.ptop.vbox.add(gtk.HSeparator()) self.ptop.vbox.add(gtk.HSeparator())
self.ptop.vbox.set_spacing(10) self.ptop.vbox.set_spacing(10)
self.pbar = gtk.ProgressBar() self.pbar = gtk.ProgressBar()
self.pbar.set_format_string(_("%v of %u (%P%%)")) # self.pbar.set_format_string(_("%v of %u (%P%%)"))
self.pbar.configure(0.0,0.0,total) # self.pbar.configure(0.0,0.0,total)
self.pbar.set_show_text(1) # self.pbar.set_show_text(1)
self.pbar.set_usize(350,20)
self.pbar_max = total self.pbar_max = total
self.pbar_index = 0.0 self.pbar_index = 0.0
self.ptop.set_size_request(350,20)
self.ptop.vbox.add(self.pbar) self.ptop.vbox.add(self.pbar)
self.ptop.show_all() self.ptop.show_all()
@ -174,7 +174,7 @@ class Report:
self.pbar_index = self.pbar_index + 1.0 self.pbar_index = self.pbar_index + 1.0
if (self.pbar_index > self.pbar_max): if (self.pbar_index > self.pbar_max):
self.pbar_index = self.pbar_max self.pbar_index = self.pbar_max
self.pbar.set_value(self.pbar_index) self.pbar.set_fraction(self.pbar_index/100.0)
def progress_bar_done(self): def progress_bar_done(self):
"""Done with the progress bar. It can be destroyed now.""" """Done with the progress bar. It can be destroyed now."""

View File

@ -778,7 +778,7 @@ class WebReport(Report.Report):
image_dir_name) image_dir_name)
return return
ind_list = self.filter.apply(self.db.getPersonMap().values()) ind_list = self.filter.apply(self.db,self.db.getPersonMap().values())
self.progress_bar_setup(float(len(ind_list))) self.progress_bar_setup(float(len(ind_list)))
doc = HtmlLinkDoc(self.selected_style,None,self.template_name,None) doc = HtmlLinkDoc(self.selected_style,None,self.template_name,None)
@ -1066,7 +1066,7 @@ class WebReportDialog(Report.ReportDialog):
"""The format frame is not used in this dialog. Hide it, and """The format frame is not used in this dialog. Hide it, and
set the output notebook to always display the html template set the output notebook to always display the html template
page.""" page."""
self.output_notebook.set_page(1) self.output_notebook.set_current_page(1)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #

View File

@ -75,14 +75,14 @@ def by_last_name(first, second):
name1 = first.PrimaryName name1 = first.PrimaryName
name2 = second.PrimaryName name2 = second.PrimaryName
fsn = su(name1.Surname) fsn = name1.Surname.upper()
ssn = su(name2.Surname) ssn = name2.Surname.upper()
if fsn == ssn : if fsn == ssn :
ffn = su(name1.FirstName) ffn = name1.FirstName.upper()
sfn = su(name2.FirstName) sfn = name2.FirstName.upper()
if ffn == sfn : if ffn == sfn :
return cmp(su(name1.Suffix), su(name2.Suffix)) return cmp(name1.Suffix.upper(), name2.Suffix.upper())
else : else :
return cmp(ffn, sfn) return cmp(ffn, sfn)
else : else :