def update_progress_gui(self, progress_text, progress):
"""Updates the progressbar to show what we are working on"""
progressbar = self.widgets.get_object('progressbar')
self.widgets.get_object('progress_dialog').show()
if float(progress) < 0:
progressbar.pulse()
else:
progressbar.set_fraction(float(progress)/100)
if progress_text != None:
self.widgets.get_object('action').set_markup("<i>" +\
_(progress_text)+"</i>")
while Gtk.events_pending():
Gtk.main_iteration()
return True
评论列表
文章目录