summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--text.py7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4fe8ffa61..d24921b01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/text.py b/text.py
index 73aea749e..4529aa277 100644
--- a/text.py
+++ b/text.py
@@ -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()