diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-09-16 17:57:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-09-16 17:57:36 +0100 |
commit | 19af4793551d652c0aac60177dfa7f71f334a813 (patch) | |
tree | 4551d1067722c9dbdbc3a72d9ee129b82679ab70 /src/frontend | |
parent | 579a8d3b4efff9ac443fc019ddf441a8d4dd184c (diff) |
rearrange gui frontend code
Diffstat (limited to 'src/frontend')
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 6b49d58..6a34117 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -16,8 +16,8 @@ class Sisyphus(QtWidgets.QMainWindow): 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.orphans.clicked.connect(self.remove_orphans) self.abort.clicked.connect(self.exit_sisyphus) self.progress.hide() @@ -28,12 +28,12 @@ class Sisyphus(QtWidgets.QMainWindow): self.uninstall_thread = UninstallThread() self.uninstall_thread.uninstallFinished.connect(self.uninstall_finished) - self.orphans_thread = OrphansThread() - self.orphans_thread.orphansFinished.connect(self.orphans_finished) - self.upgrade_thread = UpgradeThread() self.upgrade_thread.upgradeFinished.connect(self.upgrade_finished) + self.orphans_thread = OrphansThread() + self.orphans_thread.orphansFinished.connect(self.orphans_finished) + def centerOnScreen(self): resolution = QtWidgets.QDesktopWidget().screenGeometry() self.move((resolution.width() / 2) - (self.frameSize().width() / 2), @@ -65,25 +65,25 @@ class Sisyphus(QtWidgets.QMainWindow): self.progress.hide() self.show_buttons() - def remove_orphans(self): + def upgrade_system(self): self.hide_buttons() self.progress.setRange(0,0) self.progress.show() - self.orphans_thread.start() + self.upgrade_thread.start() - def orphans_finished(self): + def upgrade_finished(self): self.progress.setRange(0,1) self.progress.setValue(1) self.progress.hide() self.show_buttons() - def upgrade_system(self): + def remove_orphans(self): self.hide_buttons() self.progress.setRange(0,0) self.progress.show() - self.upgrade_thread.start() + self.orphans_thread.start() - def upgrade_finished(self): + def orphans_finished(self): self.progress.setRange(0,1) self.progress.setValue(1) self.progress.hide() @@ -160,18 +160,18 @@ class UninstallThread(QtCore.QThread): sisyphus_pkg_auto_uninstall(PKGLIST.split()) self.uninstallFinished.emit() -class OrphansThread(QtCore.QThread): - orphansFinished = QtCore.pyqtSignal() - def run(self): - sisyphus_pkg_auto_remove_orphans() - self.orphansFinished.emit() - class UpgradeThread(QtCore.QThread): upgradeFinished = QtCore.pyqtSignal() def run(self): sisyphus_pkg_auto_system_upgrade() self.upgradeFinished.emit() +class OrphansThread(QtCore.QThread): + orphansFinished = QtCore.pyqtSignal() + def run(self): + sisyphus_pkg_auto_remove_orphans() + self.orphansFinished.emit() + if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) window = Sisyphus() |