From 634c5c95e38555ada84a5d29eafd3faa109f084c Mon Sep 17 00:00:00 2001 From: Andrei Andreev Date: Mon, 3 Jun 2024 12:24:33 +0200 Subject: [PATCH] Remove search bar click event The functionality that was triggered when the search bar was clicked has been removed. Now, only pressing return in the search bar will trigger a search. This simplifies user interaction and reduces unnecessary code complexity. --- src/tribler/gui/tribler_window.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/tribler/gui/tribler_window.py b/src/tribler/gui/tribler_window.py index 51311ea443..ae8e3459f8 100644 --- a/src/tribler/gui/tribler_window.py +++ b/src/tribler/gui/tribler_window.py @@ -240,7 +240,6 @@ def __init__( self.tribler_core_test_exception_shortcut = QShortcut(QKeySequence("Ctrl+Alt+Shift+C"), self) connect(self.tribler_core_test_exception_shortcut.activated, self.on_test_tribler_core_exception) - connect(self.top_search_bar.clicked, self.clicked_search_bar) connect(self.top_search_bar.returnPressed, self.on_top_search_bar_return_pressed) # Remove the focus rect on OS X @@ -852,12 +851,6 @@ def deselect_all_menu_buttons(self, except_select=None): button.setEnabled(True) button.setChecked(False) - def clicked_search_bar(self, checked=False): - query = self.top_search_bar.text() - if query and self.search_results_page.has_results: - self.deselect_all_menu_buttons() - self.stackedWidget.setCurrentIndex(PAGE_SEARCH_RESULTS) - def on_top_search_bar_return_pressed(self): query_text = self.top_search_bar.text() if not query_text: