]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/progress: add method to pulse the progress bar
authorJoshua Lock <josh@linux.intel.com>
Tue, 1 Feb 2011 15:23:47 +0000 (15:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Mar 2011 22:30:21 +0000 (22:30 +0000)
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.

(From Poky rev: fb62c54e13e875dd81e0b5220c54a7753b4d5fa2)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/crumbs/progress.py

index 36eca38294075f10dddfa7e24748e08bbe824808..ce3a6c37b48151e41e7c456cb9e9a55582e5a9fc 100644 (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()