From 8d9b3063d3c5f2309ed118b5a20df1753677ea79 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 29 Sep 2013 20:21:49 +0300 Subject: [PATCH] Show install status of targets. --- mesongui.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mesongui.py b/mesongui.py index c126191ca..178d519b8 100755 --- a/mesongui.py +++ b/mesongui.py @@ -97,7 +97,11 @@ class TargetModel(QAbstractItemModel): typename = 'static library' else: typename = 'unknown' - self.targets.append((name, typename, num_sources)) + if target.should_install(): + installed = 'Yes' + else: + installed = 'No' + self.targets.append((name, typename, installed, num_sources)) def flags(self, index): return PyQt5.QtCore.Qt.ItemIsSelectable | PyQt5.QtCore.Qt.ItemIsEnabled @@ -108,13 +112,15 @@ class TargetModel(QAbstractItemModel): return len(self.targets) def columnCount(self, index): - return 3 + return 4 def headerData(self, section, orientation, role): if role != PyQt5.QtCore.Qt.DisplayRole: return QVariant() - if section == 2: + if section == 3: return QVariant('Source files') + if section == 2: + return QVariant('Installed') if section == 1: return QVariant('Type') return QVariant('Name')