diff options
Diffstat (limited to 'src/frontend/gui/sisyphus-qt5.py')
-rw-r--r-- | src/frontend/gui/sisyphus-qt5.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/frontend/gui/sisyphus-qt5.py b/src/frontend/gui/sisyphus-qt5.py index 067fe7a..2b4e1e6 100644 --- a/src/frontend/gui/sisyphus-qt5.py +++ b/src/frontend/gui/sisyphus-qt5.py @@ -134,12 +134,12 @@ class Sisyphus(QtWidgets.QMainWindow): rows = cursor.fetchall() Sisyphus.pkgCount = len(rows) Sisyphus.pkgSelect = 0 - model = QtGui.QStandardItemModel(len(rows), 5) + model = QtGui.QStandardItemModel(len(rows), 6) model.setHorizontalHeaderLabels( - ['Package Category', 'Package Name', 'Installed Version', 'Available Version', 'Package Description']) + ['Package Category', 'Package Name', 'SLOT', 'Installed Version', 'Available Version', 'Package Description']) for row in rows: indx = rows.index(row) - for column in range(0, 5): + for column in range(0, 6): item = QtGui.QStandardItem("%s" % (row[column])) model.setItem(indx, column, item) self.databaseTable.setModel(model) @@ -162,10 +162,13 @@ class Sisyphus(QtWidgets.QMainWindow): for pkg in self.databaseTable.selectionModel().selectedRows(0)] pkg_names = [{'row': pkg.row(), 'name': pkg.data()} for pkg in self.databaseTable.selectionModel().selectedRows(1)] + pkg_slots = [{'row': pkg.row(), 'slot': pkg.data()} + for pkg in self.databaseTable.selectionModel().selectedRows(2)] pkg_categs = sorted(pkg_categs, key=byRow) pkg_names = sorted(pkg_names, key=byRow) - selected_pkgs = [pkg_categs[i]['cat'] + '/' + - pkg_names[i]['name'] for i in range(len(pkg_categs))] + pkg_slots = sorted(pkg_slots, key=byRow) + selected_pkgs = [pkg_categs[i]['cat'] + '/' + pkg_names[i]['name'] + + ':' + pkg_slots[i]['slot'] for i in range(len(pkg_categs))] return (selected_pkgs) def packageInstall(self): |