[poky] [PATCH 10/13] bitbake/progress: add method to pulse the progress bar
Joshua Lock
josh at linux.intel.com
Fri Feb 4 00:54:21 PST 2011
From: Joshua Lock <josh at linux.intel.com>
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 at linux.intel.com>
---
bitbake/lib/bb/ui/crumbs/progress.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/progress.py b/bitbake/lib/bb/ui/crumbs/progress.py
index 36eca38..ce3a6c3 100644
--- a/bitbake/lib/bb/ui/crumbs/progress.py
+++ b/bitbake/lib/bb/ui/crumbs/progress.py
@@ -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()
--
1.7.4
More information about the poky
mailing list