Patchwork [bitbake-devel,1/1] crumbs: add back progress implementation for depexp

login
register
mail settings
Submitter Joshua Lock
Date Feb. 25, 2012, 5:52 a.m.
Message ID <e321d0a6b4c40f0f2c13a191ae1ddf7165c45ff4.1330149082.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/22037/
State Accepted
Commit d54dbe54cde8e0086bf1fb4926468e212660db53
Headers show

Comments

Joshua Lock - Feb. 25, 2012, 5:52 a.m.
The commit which introduced the new hob UI also deleted this class
which is used by depexp.

Signed-off-by: Joshua Lock <josh@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

Patch

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()