summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-08-02 23:34:19 +0200
committerglatzor@ubuntu.com <>2006-08-02 23:34:19 +0200
commitbf5a9a34dd327e858e741be1e8925584c8c88cb6 (patch)
treecfc7f992951a6a9fead8dbd5b362fba3f494c97e
parent56982bdf99d01d3d1a449afec5e9d1277179f6c7 (diff)
downloadpython-apt-bf5a9a34dd327e858e741be1e8925584c8c88cb6.tar.gz
* Handle to be newly installed "updates" in the version string
information * Add a unit b for Bytes to the download size
-rw-r--r--UpdateManager/UpdateManager.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 54b892a1..4da00664 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -726,10 +726,16 @@ class UpdateManager(SimpleGladeApp):
name = xml.sax.saxutils.escape(pkg.name)
summary = xml.sax.saxutils.escape(pkg.summary)
contents = "<b>%s</b>\n<small>%s\n" % (name, summary)
- contents = contents + _("From version %s to %s (Size: %s)") % \
- (pkg.installedVersion,
- pkg.candidateVersion,
- apt.SizeToStr(pkg.packageSize)) + "</small>"
+ if pkg.installedVersion != None:
+ contents += _("From version %s to %s") % \
+ (pkg.installedVersion,
+ pkg.candidateVersion)
+ else:
+ contents += _("Version %s") % pkg.candidateVersion
+ #TRANSLATORS: the b stands for Bytes
+ contents += " " + _("(Size: %sb)") % apt.SizeToStr(pkg.packageSize)
+ contents += "</small>"
+
iter = self.store.append([True, contents, pkg.name, pkg])
self.add_update(pkg)
i = i + 1