From d07d6aeb724100bca26acb7606bbbc0d5d90b26a Mon Sep 17 00:00:00 2001 From: bionel Date: Wed, 20 Sep 2017 22:23:31 +0300 Subject: improve filters, add Available --- src/frontend/gui/sisyphus-gui.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 65767d0..a33e3c8 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -23,7 +23,8 @@ class Sisyphus(QtWidgets.QMainWindow): self.selectfield.currentIndexChanged.connect(self.setSearchField) self.SEARCHFILTERS = OrderedDict ([ - ('*', ''), + ('All', ''), + ('Available', 'AND iv IS NULL'), ('Installed', 'AND iv IS NOT NULL'), ('Upgradable', 'AND iv < av'), ('Downgradable', 'AND iv > av') @@ -34,7 +35,7 @@ class Sisyphus(QtWidgets.QMainWindow): Sisyphus.SEARCHTERM = "'%%'" # defaults to all Sisyphus.SEARCHFIELD = self.SEARCHFIELDS['Name'] # defaults to package name - Sisyphus.SEARCHFILTER = self.SEARCHFILTERS['*'] # defaults to any + Sisyphus.SEARCHFILTER = self.SEARCHFILTERS['All'] # defaults to any self.loadDatabase(Sisyphus.SEARCHFIELD,Sisyphus.SEARCHTERM,Sisyphus.SEARCHFILTER) self.input.textEdited.connect(self.filterDatabase) -- cgit v1.2.3