summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index f8be306..2b4aa6b 100755
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -21,9 +21,10 @@ class Sisyphus(QtWidgets.QMainWindow):
self.selectfield.addItems(self.SEARCHFIELDS.keys())
self.selectfield.setCurrentIndex(1) # defaults to package name
self.selectfield.activated.connect(self.setSearchField)
-
+
+ Sisyphus.SEARCHTERM = "'%%'" # defaults to all
Sisyphus.SEARCHFIELD = "pn" # defaults to package name
- self.loadDatabase(Sisyphus.SEARCHFIELD,"'%%'")
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM)
self.input.textEdited.connect(self.filterDatabase)
@@ -84,8 +85,8 @@ class Sisyphus(QtWidgets.QMainWindow):
def filterDatabase(self):
search = self.input.text()
- searchTerm = "'%" + search + "%'"
- self.loadDatabase(Sisyphus.SEARCHFIELD,searchTerm)
+ Sisyphus.SEARCHTERM = "'%" + search + "%'"
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM)
def packageInstall(self):
indexes = self.database.selectionModel().selectedRows(1)
@@ -100,6 +101,7 @@ class Sisyphus(QtWidgets.QMainWindow):
def finishedInstall(self):
self.hideProgressBar()
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM)
def packageUninstall(self):
indexes = self.database.selectionModel().selectedRows(1)
@@ -114,6 +116,7 @@ class Sisyphus(QtWidgets.QMainWindow):
def finishedUninstall(self):
self.hideProgressBar()
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM)
def systemUpgrade(self):
self.showProgressBar()
@@ -128,6 +131,7 @@ class Sisyphus(QtWidgets.QMainWindow):
def finishedOrphans(self):
self.hideProgressBar()
+ self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM)
def showProgressBar(self):
self.hideButtons()