From 2cb075738b9d7531fab9a8975aafd7e7dd190d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20P=2E=20M=C3=B6ller?= Date: Sun, 27 Sep 2020 12:22:38 -0300 Subject: [PATCH] add package description --- debian/changelog | 2 +- lubuntu-notifier.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 90bf081..b10e310 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ lubuntu-update-notifier (0.4dev) UNRELEASED; urgency=medium * Added internationalization support. - * Added packages version info. + * Added packages version and description. * Added security package mark. -- Hans P Möller Sat, 12 Sep 2020 13:59:25 -0300 diff --git a/lubuntu-notifier.py b/lubuntu-notifier.py index cbf8000..2fbc2ea 100755 --- a/lubuntu-notifier.py +++ b/lubuntu-notifier.py @@ -67,6 +67,7 @@ class Dialog(QWidget): sys.stderr.write(_("Error: Opening the cache (%s)") % e) sys.exit(-1) self.depcache = apt_pkg.DepCache(self.cache) + self.records = apt_pkg.PackageRecords(self.cache) self.initUI() self.buttonBox.rejected.connect(self.call_reject) @@ -148,7 +149,9 @@ class Dialog(QWidget): td_child.setIcon(1, QIcon.fromTheme("security-high")) toInstall.setIcon(1, QIcon.fromTheme("security-high")) toInstall.addChild(td_child) - # td_child.addChild(QTreeWidgetItem([p[1].ver_str])) + self.records.lookup(p[1].file_list[0]) + short = QTreeWidgetItem([self.records.short_desc]) + td_child.addChild(short) toInstall.setIcon(0, QIcon.fromTheme( "system-software-install")) self.tw.addTopLevelItem(toInstall) @@ -162,6 +165,9 @@ class Dialog(QWidget): td_child.setIcon(1, QIcon.fromTheme("security-high")) toUpgrade.setIcon(1, QIcon.fromTheme("security-high")) toUpgrade.addChild(td_child) + self.records.lookup(p[1].file_list[0]) + short = QTreeWidgetItem([self.records.short_desc]) + td_child.addChild(short) toUpgrade.setIcon(0, QIcon.fromTheme("system-software-update")) self.tw.addTopLevelItem(toUpgrade)