diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-10-03 14:33:54 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-10-03 14:33:54 +0300 |
commit | 4649eb40fc577b3e3e791b24c877f1d988d0c840 (patch) | |
tree | 579a538ac8a6b02b447d3a1c91800f60cc3817b0 | |
parent | cee0d4b7f47d3157b6231f5c23ec5e4e04c73911 (diff) | |
download | tdebase-issue/227.tar.gz tdebase-issue/227.zip |
Make search field unfocusable via Escape.issue/227
This resolves #227.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r-- | kicker/kicker/ui/k_mnu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp index 5be0f2c8a..e2eb6f3bd 100644 --- a/kicker/kicker/ui/k_mnu.cpp +++ b/kicker/kicker/ui/k_mnu.cpp @@ -737,9 +737,14 @@ void PanelKMenu::keyPressEvent(TQKeyEvent* e) if (!searchEdit) return KPanelMenu::keyPressEvent(e); - if (e->key() == TQt::Key_Escape && searchEdit->text().isEmpty() == false) { + if (e->key() == TQt::Key_Escape && searchEdit->text().isEmpty() == false) + { searchEdit->clear(); } + else if (e->key() == TQt::Key_Escape && searchEdit->hasFocus()) + { + searchEdit->clearFocus(); + } else if (e->key() == TQt::Key_Delete && !searchEdit->hasFocus() && searchEdit->text().isEmpty() == false) { |