summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/crumbs
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-11-25 15:54:19 +0000
committerChris Larson <chris_larson@mentor.com>2010-12-08 20:07:44 -0700
commitd2c4d0b2af43eb6b09086db1f8fe9e87e0bc6d23 (patch)
tree4b7abf1100465a3f3cbdc19cbd35ff6121ed4cbc /lib/bb/ui/crumbs
parent4113f293427a6c64f0bbf948ada241b3ea32592b (diff)
downloadbitbake-d2c4d0b2af43eb6b09086db1f8fe9e87e0bc6d23.tar.gz
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 'lib/bb/ui/crumbs')
-rw-r--r--lib/bb/ui/crumbs/runningbuild.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index d4ba4b747..9730bfd47 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/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)