summaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-07-21 20:57:42 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-07-21 20:57:42 +0100
commit27f1a3205096806d03393c27df6889d30fa59d00 (patch)
treef978d5cdf55837916439c24e4228fb17ee11356c /src/frontend
parent3276375c5caec7bea0aa44a78f73581b701131e3 (diff)
give visual feedback if searched package does not exist
Diffstat (limited to 'src/frontend')
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py4
-rw-r--r--src/frontend/gui/ui/sisyphus-gui.ui2
2 files changed, 4 insertions, 2 deletions
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:
diff --git a/src/frontend/gui/ui/sisyphus-gui.ui b/src/frontend/gui/ui/sisyphus-gui.ui
index 46050a3..d7e2e6d 100644
--- a/src/frontend/gui/ui/sisyphus-gui.ui
+++ b/src/frontend/gui/ui/sisyphus-gui.ui
@@ -240,7 +240,7 @@
</rect>
</property>
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Type in package name&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Write package name and press Enter&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>