diff options
author | Rob Bradford <rob@linux.intel.com> | 2008-11-14 14:14:08 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2008-12-01 20:50:34 +0000 |
commit | 199828c20ee67984d2efd45e81f110f33f5bfa8e (patch) | |
tree | 57262126b6a24b9bbaa47c318354ce501a2c377b /bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | |
parent | 340b2b5612875e6544fd0f6e45e37e7206dd6db2 (diff) | |
download | openembedded-core-199828c20ee67984d2efd45e81f110f33f5bfa8e.tar.gz openembedded-core-199828c20ee67984d2efd45e81f110f33f5bfa8e.tar.bz2 openembedded-core-199828c20ee67984d2efd45e81f110f33f5bfa8e.zip |
bitbake-dev: Add basics of "puccho" image builder UI
Diffstat (limited to 'bitbake-dev/lib/bb/ui/crumbs/runningbuild.py')
-rw-r--r-- | bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py index b9aba5b8cc..54d56c2452 100644 --- a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py @@ -18,8 +18,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import gobject import gtk +import gobject +import gtk.glade class RunningBuildModel (gtk.TreeStore): (COL_TYPE, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_ACTIVE) = (0, 1, 2, 3, 4, 5) @@ -34,9 +35,12 @@ class RunningBuildModel (gtk.TreeStore): class RunningBuild (gobject.GObject): __gsignals__ = { - 'build-finished' : (gobject.SIGNAL_RUN_LAST, - gobject.TYPE_NONE, - ()) + 'build-succeeded' : (gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + ()), + 'build-failed' : (gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + ()) } pids_to_task = {} tasks_to_iter = {} @@ -150,6 +154,15 @@ class RunningBuild (gobject.GObject): del self.tasks_to_iter[(package, task)] del self.pids_to_task[pid] + elif event[0].startswith('bb.event.BuildCompleted'): + failures = int (event[1]['_failures']) + + # Emit the appropriate signal depending on the number of failures + if (failures > 1): + self.emit ("build-failed") + else: + self.emit ("build-succeeded") + class RunningBuildTreeView (gtk.TreeView): def __init__ (self): gtk.TreeView.__init__ (self) @@ -166,4 +179,3 @@ class RunningBuildTreeView (gtk.TreeView): self.append_column (col) - |