summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index 54b52ed..7d05500 100755
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -9,7 +9,6 @@ class Sisyphus(QtWidgets.QMainWindow):
super(Sisyphus, self).__init__()
uic.loadUi('ui/sisyphus-gui.ui', self)
self.centerOnScreen()
- self.updateSystem()
self.show()
self.progress.hide()
@@ -40,6 +39,9 @@ class Sisyphus(QtWidgets.QMainWindow):
self.input.textEdited.connect(self.filterDatabase)
+ self.updateThread = UpdateThread()
+ self.updateThread.updateFinished.connect(self.finishedUpdate)
+
self.installThread = InstallThread()
self.install.clicked.connect(self.packageInstall)
self.installThread.installFinished.connect(self.finishedInstall)
@@ -56,6 +58,9 @@ class Sisyphus(QtWidgets.QMainWindow):
self.orphans.clicked.connect(self.orphansRemove)
self.orphansThread.orphansFinished.connect(self.finishedOrphans)
+ self.updateSystem()
+ self.finishedUpdate()
+
self.abort.clicked.connect(self.sisyphusExit)
def setSearchField(self):
@@ -103,9 +108,11 @@ class Sisyphus(QtWidgets.QMainWindow):
self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER)
def updateSystem(self):
- self.updateThread = UpdateThread()
self.updateThread.start()
+ def finishedUpdate(self):
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER)
+
def packageInstall(self):
indexes = self.database.selectionModel().selectedRows(1)
if len(indexes) == 0:
@@ -184,6 +191,7 @@ class UpdateThread(QtCore.QThread):
updateFinished = QtCore.pyqtSignal()
def run(self):
sisyphus_pkg_system_update()
+ self.updateFinished.emit()
class InstallThread(QtCore.QThread):
installFinished = QtCore.pyqtSignal()