summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-29 23:32:10 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-29 23:32:10 +0200
commit4f180848e8b01002379173e27a19f0aa5c13ac8b (patch)
tree776e001c13f52d038960c8f3f5144636c5d6f701 /DistUpgrade
parentc9d03a8a633afd3b6a17b985bc640d59c6889a45 (diff)
downloadpython-apt-4f180848e8b01002379173e27a19f0aa5c13ac8b.tar.gz
* DistUpgrade/*:
- made the download time display a bit nicer.
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeView.py7
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py
index a42d2b8f..45c5521b 100644
--- a/DistUpgrade/DistUpgradeView.py
+++ b/DistUpgrade/DistUpgradeView.py
@@ -29,13 +29,12 @@ def FuzzyTimeToStr(sec):
return _("%li minutes") % (sec/60)
return _("%li seconds") % sec
-def estimatedDownloadTime(self, size):
+def estimatedDownloadTime(requiredDownload):
""" get the estimated download time """
- requiredDownload = self.requiredDownload
timeModem = requiredDownload/(56*1024/8) # 56 kbit
timeDSL = requiredDownload/(1024*1024/8) # 1Mbit = 1024 kbit
- s= _("The download will approximately take %s with a 56k modem and %s with "
- "a 1Mbit DSL connection" % FuzzyTimeToStr(timeModem), FuzzyTimeToStr(timeDSL))
+ s= _("This download will take about %s with a 56k modem and about %s with "
+ "a 1Mbit DSL connection" % (FuzzyTimeToStr(timeModem), FuzzyTimeToStr(timeDSL)))
return s
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index 90d1e157..b81f9cf7 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -474,7 +474,7 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp):
msg +=" "
if downloadSize > 0:
- msg += _("You have to download a total of %s." %\
+ msg += _("You have to download a total of %s. " %\
apt_pkg.SizeToStr(downloadSize))
msg += estimatedDownloadTime(downloadSize)