summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2000-07-20 04:36:22 +0000
committerMike Fulbright <msf@redhat.com>2000-07-20 04:36:22 +0000
commit59cd7165205f57d125dc75cdf0cef6c25e456498 (patch)
treebc6d731d07f5ca604a5ae7b033ce14efd09069b3 /iw
parent08e354a02e7c0b6c609e40393eb5986bf6ee242e (diff)
downloadanaconda-59cd7165205f57d125dc75cdf0cef6c25e456498.tar.gz
anaconda-59cd7165205f57d125dc75cdf0cef6c25e456498.tar.xz
anaconda-59cd7165205f57d125dc75cdf0cef6c25e456498.zip
fix to do progress in Kbyte units
Diffstat (limited to 'iw')
-rw-r--r--iw/progress_gui.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index 86591a957..b6af23dcc 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -59,17 +59,19 @@ class InstallProgressWindow (InstallWindow):
threads_enter ()
self.numComplete = self.numComplete + 1
+
apply (self.clist.set_text, self.status["completed"]["packages"] + ("%d" % self.numComplete,))
- self.sizeComplete = self.sizeComplete + header[rpm.RPMTAG_SIZE]
+ self.sizeComplete = self.sizeComplete + (header[rpm.RPMTAG_SIZE]/1024)
+
apply (self.clist.set_text, self.status["completed"]["size"] +
- ("%d M" % (self.sizeComplete),))
+ ("%d M" % (self.sizeComplete/1024),))
apply (self.clist.set_text, self.status["remaining"]["packages"] +
("%d" % (self.numTotal - self.numComplete),))
apply (self.clist.set_text, self.status["remaining"]["size"] +
- ("%d M" % (self.totalSize - self.sizeComplete),))
+ ("%d M" % ((self.totalSize - self.sizeComplete)/1024),))
# check to see if we've started yet
if (self.timeStarted == -1):
@@ -77,14 +79,16 @@ class InstallProgressWindow (InstallWindow):
elapsedTime = 0
else:
elapsedTime = time.time() - self.timeStarted
-
+
apply (self.clist.set_text, self.status["completed"]["time"] + ("%s" % formatTime(elapsedTime),))
if self.sizeComplete != 0:
finishTime = (float (self.totalSize) / self.sizeComplete) * elapsedTime
else:
finishTime = (float (self.totalSize) / self.sizeComplete+1) * elapsedTime
- apply (self.clist.set_text, self.status["total"]["time"] + ("%s" % formatTime(finishTime),))
+
+
+ apply (self.clist.set_text, self.status["total"]["time"] + ("%s" % formatTime(finishTime),))
remainingTime = finishTime - elapsedTime
apply (self.clist.set_text, self.status["remaining"]["time"] + ("%s" % formatTime(remainingTime),))
@@ -131,10 +135,9 @@ class InstallProgressWindow (InstallWindow):
self.totalSize = totalSize
self.timeStarted = -1
- apply (self.clist.set_text, self.status["total"]["packages"] + ("%d" % total,))
-
+ apply (self.clist.set_text, self.status["total"]["packages"] + (("%d" % total),))
apply (self.clist.set_text, self.status["total"]["size"] +
- ("%d M" % totalSize,))
+ (("%d M" % (totalSize/1024)),))
threads_leave ()
def allocate (self, widget, *args):