diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2005-12-22 11:17:19 +0000 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2005-12-22 11:17:19 +0000 |
commit | f44cf9f3be7aa6f74af279710303fd0bdf068cf2 (patch) | |
tree | 978bc342963baf6eb45ed773619f482d807c4a43 /text.py | |
parent | 2121ebf882c045c45d31327d7be5b7498554d390 (diff) | |
download | anaconda-f44cf9f3be7aa6f74af279710303fd0bdf068cf2.tar.gz anaconda-f44cf9f3be7aa6f74af279710303fd0bdf068cf2.tar.xz anaconda-f44cf9f3be7aa6f74af279710303fd0bdf068cf2.zip |
Make the progress bar work for depsolving (#176367)
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -119,13 +119,16 @@ class ProgressWindow: self.scale = None def set(self, amount): - self.scale.set(int(amount)) + self.scale.set(float(amount) * self.multiplier) self.screen.refresh() def refresh(self): pass def __init__(self, screen, title, text, total, updpct): + self.multiplier = 1 + if total == 1.0: + self.multiplier = 100 self.screen = screen width = 55 if (len(text) > width): width = len(text) @@ -135,7 +138,7 @@ class ProgressWindow: g = GridForm(self.screen, title, 1, 2) g.add(t, 0, 0, (0, 0, 0, 1), anchorLeft=1) - self.scale = Scale(int(width), int(total)) + self.scale = Scale(int(width), float(total) * self.multiplier) g.add(self.scale, 0, 1) g.draw() |