2007-08-31 Don Allingham <don@gramps-project.org>

* src/ExportAssistant.py (ExportAssistant.pulse_progressbar): fix 
	display value, crashed if text wasn't specified



svn: r8905
This commit is contained in:
Don Allingham 2007-08-31 14:26:59 +00:00
parent 48823717ea
commit ba04d297b9
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2007-08-31 Don Allingham <don@gramps-project.org>
* src/ExportAssistant.py (ExportAssistant.pulse_progressbar): fix
display value, crashed if text wasn't specified
2007-08-31 Benny Malengier <benny.malengier@gramps-project.org>
* src/Editors/_EditPerson.py: bug, save(self, obj) to save(self, *obj)

View File

@ -578,9 +578,12 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
while gtk.events_pending():
gtk.main_iteration()
def pulse_progressbar(self, value, text):
def pulse_progressbar(self, value, text=None):
self.progressbar.set_fraction(min(value/100.0, 1.0))
self.progressbar.set_text("%s: %d%%" % (text, value))
if text:
self.progressbar.set_text("%s: %d%%" % (text, value))
else:
self.progressbar.set_text("%d%%" % value)
while gtk.events_pending():
gtk.main_iteration()