summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-03-29 12:19:40 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-03-29 12:19:40 +0200
commit44adfdcf86cf45d4ce62a2de755f747fc3f6e208 (patch)
tree3a8a76085fcf88030b657c6beb85505a87971c83 /DistUpgrade
parentceedd9449aebce9916e8c7f29640756214f8c37d (diff)
downloadpython-apt-44adfdcf86cf45d4ce62a2de755f747fc3f6e208.tar.gz
* show the eta in the progresbar
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index 1e860c93..93cb8027 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -210,10 +210,10 @@ class GtkInstallProgressAdapter(InstallProgress):
self.progress.set_fraction(float(percent)/100.0)
# only show if more than 5s and less than 2 days
if eta > 5.0 and eta < (60*60*24*2):
- status = "%s (%s remaining)" % (status.strip(),apt_pkg.TimeToStr(eta))
+ self.progress.set_text(_("%s remaining") % apt_pkg.TimeToStr(eta))
else:
- status = status.strip()
- self.label_status.set_text(status)
+ self.progress.set_text(" ")
+ self.label_status.set_text(status.strip())
def child_exited(self, term, pid, status):
self.apt_status = os.WEXITSTATUS(status)
@@ -229,6 +229,7 @@ class GtkInstallProgressAdapter(InstallProgress):
def updateInterface(self):
InstallProgress.updateInterface(self)
+ # check if we haven't started yet with packages, pulse then
if self.start_time == 0.0:
self.progress.pulse()
time.sleep(0.15)