[bitbake-devel] [PATCH 1/1] crumbs: add back progress implementation for depexp
Joshua Lock
josh at linux.intel.com
Sat Feb 25 05:52:58 UTC 2012
The commit which introduced the new hob UI also deleted this class
which is used by depexp.
Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
lib/bb/ui/crumbs/progress.py | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 lib/bb/ui/crumbs/progress.py
diff --git a/lib/bb/ui/crumbs/progress.py b/lib/bb/ui/crumbs/progress.py
new file mode 100644
index 0000000..0c7ad96
--- /dev/null
+++ b/lib/bb/ui/crumbs/progress.py
@@ -0,0 +1,20 @@
+import gtk
+
+class ProgressBar(gtk.Dialog):
+ def __init__(self, parent):
+
+ gtk.Dialog.__init__(self, flags=(gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT))
+ self.set_title("Parsing metadata, please wait...")
+ self.set_default_size(500, 0)
+ self.set_transient_for(parent)
+ self.progress = gtk.ProgressBar()
+ self.vbox.pack_start(self.progress)
+ self.show_all()
+
+ def update(self, x, y):
+ self.progress.set_fraction(float(x)/float(y))
+ self.progress.set_text("%2d %%" % (x*100/y))
+
+ def pulse(self):
+ self.progress.set_text("Loading...")
+ self.progress.pulse()
--
1.7.7.6
More information about the bitbake-devel
mailing list