diff options
author | Joshua Lock <josh@linux.intel.com> | 2012-02-24 21:52:58 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-25 11:55:45 +0000 |
commit | 2ff96d664e8e003f64de42187fce9ad0f9646070 (patch) | |
tree | af872b949093152b41c244463b792b9a1722f9e9 | |
parent | c9e95d3363d28ae92eb9ed1ed560ad3769482f8a (diff) | |
download | poky-2ff96d664e8e003f64de42187fce9ad0f9646070.tar.gz |
crumbs: add back progress implementation for depexp
The commit which introduced the new hob UI also deleted this class
which is used by depexp.
(Bitbake rev: d54dbe54cde8e0086bf1fb4926468e212660db53)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/progress.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/progress.py b/bitbake/lib/bb/ui/crumbs/progress.py new file mode 100644 index 0000000000..0c7ad963b5 --- /dev/null +++ b/bitbake/lib/bb/ui/crumbs/progress.py | |||
@@ -0,0 +1,20 @@ | |||
1 | import gtk | ||
2 | |||
3 | class ProgressBar(gtk.Dialog): | ||
4 | def __init__(self, parent): | ||
5 | |||
6 | gtk.Dialog.__init__(self, flags=(gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)) | ||
7 | self.set_title("Parsing metadata, please wait...") | ||
8 | self.set_default_size(500, 0) | ||
9 | self.set_transient_for(parent) | ||
10 | self.progress = gtk.ProgressBar() | ||
11 | self.vbox.pack_start(self.progress) | ||
12 | self.show_all() | ||
13 | |||
14 | def update(self, x, y): | ||
15 | self.progress.set_fraction(float(x)/float(y)) | ||
16 | self.progress.set_text("%2d %%" % (x*100/y)) | ||
17 | |||
18 | def pulse(self): | ||
19 | self.progress.set_text("Loading...") | ||
20 | self.progress.pulse() | ||