From patchwork Sat Feb 25 05:52:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 1/1] crumbs: add back progress implementation for depexp Date: Sat, 25 Feb 2012 05:52:58 -0000 From: Joshua Lock X-Patchwork-Id: 22037 Message-Id: To: bitbake-devel@lists.openembedded.org The commit which introduced the new hob UI also deleted this class which is used by depexp. Signed-off-by: Joshua Lock --- 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()