diff options
Diffstat (limited to 'src/frontend')
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 6f916e2..e0b112a 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -87,13 +87,13 @@ class Sisyphus(QtWidgets.QMainWindow): def setSearchField(self): Sisyphus.SEARCHFIELD = self.SEARCHFIELDS[self.selectfield.currentText()] - self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) + self.loadDatabase() def setSearchFilter(self): Sisyphus.SEARCHFILTER = self.SEARCHFILTERS[self.selectfilter.currentText()] - self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) + self.loadDatabase() - def loadDatabase(self,searchField,searchTerm,searchFilter): + def loadDatabase(self): with sqlite3.connect('/var/lib/sisyphus/db/sisyphus.db') as db: cursor=db.cursor() cursor.execute('''SELECT @@ -108,7 +108,7 @@ class Sisyphus(QtWidgets.QMainWindow): AND a.name = i.name AND a.slot = i.slot WHERE %s LIKE %s %s - ''' % (searchField, searchTerm, searchFilter)) + ''' % (Sisyphus.SEARCHFIELD, Sisyphus.SEARCHTERM, Sisyphus.SEARCHFILTER)) rows = cursor.fetchall() Sisyphus.PKGCOUNT = len(rows) Sisyphus.PKGSELECTED = 0 @@ -125,10 +125,10 @@ class Sisyphus(QtWidgets.QMainWindow): def filterDatabase(self): search = self.input.text() Sisyphus.SEARCHTERM = "'%" + search + "%'" - self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) + self.loadDatabase() def updateSystem(self): - self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) + self.loadDatabase() self.updateThread.start() def packageInstall(self): @@ -159,7 +159,7 @@ class Sisyphus(QtWidgets.QMainWindow): def jobDone(self): self.hideProgressBar() - self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) + self.loadDatabase() def showProgressBar(self): self.hideButtons() |