summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-11-25 15:54:19 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-07 12:51:16 +0000
commit84384aa8a9b052a4740fd266694ecb4990b6edf5 (patch)
treee73407b13378bf5a389b28a9af9fcff18b2a529c /bitbake
parent1307d64286802dbaa1d58260cc50200d5f49f92c (diff)
downloadopenembedded-core-84384aa8a9b052a4740fd266694ecb4990b6edf5.tar.gz
openembedded-core-84384aa8a9b052a4740fd266694ecb4990b6edf5.tar.bz2
openembedded-core-84384aa8a9b052a4740fd266694ecb4990b6edf5.tar.xz
openembedded-core-84384aa8a9b052a4740fd266694ecb4990b6edf5.zip
bitbake/crumbs: add optional pbar parameter to RunningBuild.handle_event()
Defaults to None, but if set will pass the ParseProgress sofar and total to pbar's update() method. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index d4ba4b747..9730bfd47 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -48,7 +48,7 @@ class RunningBuild (gobject.GObject):
gobject.GObject.__init__ (self)
self.model = RunningBuildModel()
- def handle_event (self, event):
+ def handle_event (self, event, pbar=None):
# Handle an event from the event queue, this may result in updating
# the model and thus the UI. Or it may be to tell us that the build
# has finished successfully (or not, as the case may be.)
@@ -162,6 +162,14 @@ class RunningBuild (gobject.GObject):
else:
self.emit ("build-succeeded")
+ elif isinstance(event, bb.event.ParseProgress) and pbar:
+ x = event.sofar
+ y = event.total
+ if x == y:
+ pbar.hide()
+ return
+ pbar.update(x, y)
+
class RunningBuildTreeView (gtk.TreeView):
def __init__ (self):
gtk.TreeView.__init__ (self)