ui/depexp.py: use the new progressbar in Hob
cover ui/depexp.py: use the new progressbar in Hob
Hi,
This patch is about Yocto 2149, use the new progressbar in Hob to reduce the maintenance burden of the multiple GUIs.
Regards,
Kai
The following changes since commit e0a70547069fe7e8a2d6bdaffc985fb172d46c31:
perl: Allow perl to cross build and native build in a directory named "t" (2012-06-18 17:33:04 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/distro
Kang Kai (1):
ui/depexp.py: use the new progressbar in Hob
bitbake/lib/bb/ui/depexp.py | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/1 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.
--- bitbake/lib/bb/ui/depexp.py | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-)
bitbake/lib/bb/ui/depexp.py +18 -11
@@ -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):
Signature · 1 line
1.7.5.4
Richard Purdie
AppliedQuoted 9 lines · Kang Kai
[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 <[email protected]>--- bitbake/lib/bb/ui/depexp.py | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-)
Merged to master, thanks.
Richard