From d7f47c37cbf4a6c3f92b518e6ce6e144e9e67276 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 9 Jul 2017 17:39:53 +0100 Subject: enable filtering widget (signals not yet connected) --- src/frontend/gui/sisyphus-gui.py | 26 +++++++++++----------- src/frontend/gui/ui/sisyphus-gui.ui | 44 ++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 800dfad..1a7a64a 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -12,11 +12,11 @@ class Sisyphus(QtWidgets.QMainWindow): self.show() self.load_packages() - self.package_install.clicked.connect(self.install_package) - self.package_uninstall.clicked.connect(self.uninstall_package) - self.orphans_remove.clicked.connect(self.remove_orphans) - self.system_upgrade.clicked.connect(self.upgrade_system) - self.sisyphus_exit.clicked.connect(self.exit_sisyphus) + self.install.clicked.connect(self.install_package) + self.uninstall.clicked.connect(self.uninstall_package) + self.orphans.clicked.connect(self.remove_orphans) + self.upgrade.clicked.connect(self.upgrade_system) + self.abort.clicked.connect(self.exit_sisyphus) def centerOnScreen(self): resolution = QtWidgets.QDesktopWidget().screenGeometry() @@ -24,11 +24,11 @@ class Sisyphus(QtWidgets.QMainWindow): (resolution.height() / 2) - (self.frameSize().height() / 2)) def install_package(self): - pkgname = self.table_everything.item(self.table_everything.currentRow(), 1).text() + pkgname = self.database.item(self.database.currentRow(), 1).text() subprocess.Popen(['xterm', '-e', 'sisyphus', 'auto-install'] + pkgname.split()) def uninstall_package(self): - pkgname = self.table_everything.item(self.table_everything.currentRow(), 1).text() + pkgname = self.database.item(self.database.currentRow(), 1).text() subprocess.Popen(['xterm', '-e', 'sisyphus', 'auto-uninstall'] + pkgname.split()) def remove_orphans(self): @@ -62,12 +62,12 @@ class Sisyphus(QtWidgets.QMainWindow): for row in rows: inx = rows.index(row) - self.table_everything.insertRow(inx) - self.table_everything.setItem(inx, 0, QtWidgets.QTableWidgetItem(row[0])) - self.table_everything.setItem(inx, 1, QtWidgets.QTableWidgetItem(row[1])) - self.table_everything.setItem(inx, 2, QtWidgets.QTableWidgetItem(row[2])) - self.table_everything.setItem(inx, 3, QtWidgets.QTableWidgetItem(row[3])) - self.table_everything.setItem(inx, 4, QtWidgets.QTableWidgetItem(row[4])) + self.database.insertRow(inx) + self.database.setItem(inx, 0, QtWidgets.QTableWidgetItem(row[0])) + self.database.setItem(inx, 1, QtWidgets.QTableWidgetItem(row[1])) + self.database.setItem(inx, 2, QtWidgets.QTableWidgetItem(row[2])) + self.database.setItem(inx, 3, QtWidgets.QTableWidgetItem(row[3])) + self.database.setItem(inx, 4, QtWidgets.QTableWidgetItem(row[4])) if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) diff --git a/src/frontend/gui/ui/sisyphus-gui.ui b/src/frontend/gui/ui/sisyphus-gui.ui index f2cbcdb..ad37fbd 100644 --- a/src/frontend/gui/ui/sisyphus-gui.ui +++ b/src/frontend/gui/ui/sisyphus-gui.ui @@ -32,13 +32,13 @@ ../icon/sisyphus.png../icon/sisyphus.png - + 25 - 25 + 75 950 - 500 + 450 @@ -106,7 +106,7 @@ - + 225 @@ -132,7 +132,7 @@ - + 425 @@ -158,7 +158,7 @@ - + 825 @@ -181,7 +181,7 @@ - + 25 @@ -207,7 +207,7 @@ - + 625 @@ -230,13 +230,31 @@ + + + + 250 + 25 + 500 + 25 + + + + Enter package name... + + + true + + - table_everything - package_install - package_uninstall - orphans_remove - sisyphus_exit + input + database + install + uninstall + orphans + upgrade + abort -- cgit v1.2.3