diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-09-21 19:24:21 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-09-21 19:24:21 +0100 |
commit | c11e751eeb4d8173bb9e26dc05bed09fc5026715 (patch) | |
tree | 230431a86b5ad658c0e854a90d8e31dc154d03e7 /src/frontend | |
parent | 88c12349dd5f71af16a6398dda4684f15691ab5b (diff) |
sisyphus gui : reload the table once updateFinished signal is sent
Diffstat (limited to 'src/frontend')
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 12 |
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() |