From 27f1a3205096806d03393c27df6889d30fa59d00 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 21 Jul 2017 20:57:42 +0100 Subject: give visual feedback if searched package does not exist --- src/frontend/gui/sisyphus-gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/frontend/gui/sisyphus-gui.py') diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 96edcd7..875124a 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -12,7 +12,7 @@ class Sisyphus(QtWidgets.QMainWindow): self.show() self.load_packages() - self.input.textEdited.connect(self.filter_database) + self.input.returnPressed.connect(self.filter_database) self.install.clicked.connect(self.install_package) self.uninstall.clicked.connect(self.uninstall_package) @@ -53,6 +53,8 @@ class Sisyphus(QtWidgets.QMainWindow): coordinates = map(int, results) for coordinate in coordinates: self.database.setCurrentCell(coordinate, 0) + else: + self.input.setText("There are no packages with that name...") def load_packages(self): with sqlite3.connect('/var/lib/sisyphus/db/sisyphus.db') as db: -- cgit v1.2.3