summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-06-19 17:39:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:14:06 +0100
commit6c0da26adbdcaa0c56737bacddb61678a9095e32 (patch)
tree70603ad6f25a5af6f4970f99053b6f75b2807a56 /lib
parent604df1b25cf114e083f52917df2df64e01279c25 (diff)
downloadbitbake-6c0da26adbdcaa0c56737bacddb61678a9095e32.tar.gz
ui/depexp.py: use the new progressbar in Hob
[Yocto 2149] Use the new progressbar in Hob, so that we can reduce the maintenance burden of the multiple GUIs. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/depexp.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/bb/ui/depexp.py b/lib/bb/ui/depexp.py
index b62adbf85..425302e32 100644
--- a/lib/bb/ui/depexp.py
+++ b/lib/bb/ui/depexp.py
@@ -24,7 +24,7 @@ import threading
import xmlrpclib
import bb
import bb.event
-from bb.ui.crumbs.progress import ProgressBar
+from bb.ui.crumbs.progressbar import HobProgressBar
# Package Model
(COL_PKG_NAME) = (0)
@@ -220,8 +220,12 @@ def main(server, eventHandler):
gtk.gdk.threads_enter()
dep = DepExplorer()
- pbar = ProgressBar(dep)
- pbar.connect("delete-event", gtk.main_quit)
+ bardialog = gtk.Dialog(parent=dep)
+ bardialog.set_default_size(400, 50)
+ pbar = HobProgressBar()
+ bardialog.vbox.pack_start(pbar)
+ bardialog.show_all()
+ bardialog.connect("delete-event", gtk.main_quit)
gtk.gdk.threads_leave()
progress_total = 0
@@ -238,19 +242,20 @@ def main(server, eventHandler):
if isinstance(event, bb.event.CacheLoadStarted):
progress_total = event.total
gtk.gdk.threads_enter()
- pbar.set_title("Loading Cache")
- pbar.update(0, progress_total)
+ bardialog.set_title("Loading Cache")
+ pbar.update(0)
gtk.gdk.threads_leave()
if isinstance(event, bb.event.CacheLoadProgress):
x = event.current
gtk.gdk.threads_enter()
- pbar.update(x, progress_total)
+ pbar.update(x * 1.0 / progress_total)
+ pbar.set_title('')
gtk.gdk.threads_leave()
continue
if isinstance(event, bb.event.CacheLoadCompleted):
- pbar.hide()
+ bardialog.hide()
continue
if isinstance(event, bb.event.ParseStarted):
@@ -258,19 +263,21 @@ def main(server, eventHandler):
if progress_total == 0:
continue
gtk.gdk.threads_enter()
- pbar.set_title("Processing recipes")
- pbar.update(0, progress_total)
+ pbar.update(0)
+ bardialog.set_title("Processing recipes")
+
gtk.gdk.threads_leave()
if isinstance(event, bb.event.ParseProgress):
x = event.current
gtk.gdk.threads_enter()
- pbar.update(x, progress_total)
+ pbar.update(x * 1.0 / progress_total)
+ pbar.set_title('')
gtk.gdk.threads_leave()
continue
if isinstance(event, bb.event.ParseCompleted):
- pbar.hide()
+ bardialog.hide()
continue
if isinstance(event, bb.event.DepTreeGenerated):