diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | text.py | 7 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2005-12-22 Paul Nasrat <pnasrat@redhat.com> + + * text.py: Make the progress bar work for depsolving (#176367) + 2005-12-21 Jeremy Katz <katzj@redhat.com> * gui.py: Need the a11y stuff here now @@ -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() |