bitbake/progress: add method to pulse the progress bar

When we're running a long operation with indeterminate duration it's useful
to use the gtk.ProgressBar's pulse method to show that something is happening
but we don't know how long it will take.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
This commit is contained in:
Joshua Lock 2011-02-01 15:23:47 +00:00 committed by Richard Purdie
parent 7f8aa691c5
commit fb62c54e13

View File

@ -15,3 +15,7 @@ class ProgressBar(gtk.Dialog):
def update(self, x, y):
self.progress.set_fraction(float(x)/float(y))
self.progress.set_text("%2d %%" % (x*100/y))
def pulse(self):
self.progress.set_text("Loading...")
self.progress.pulse()