Commit 4cd448de authored by Philipp Hörist's avatar Philipp Hörist

StartChat: Improve global muc search

- Don't clear the search entry when pressing the global search button
- Start a search automatically after pressing the button
parent e52ab0ea
Pipeline #5738 passed with stages
in 3 minutes and 3 seconds
......@@ -370,15 +370,17 @@ class StartChatDialog(Gtk.ApplicationWindow):
return box == Search.GLOBAL
def _on_global_search_toggle(self, button):
self._ui.search_entry.set_text('')
self._ui.search_entry.grab_focus()
image_style_context = button.get_children()[0].get_style_context()
if button.get_active():
image_style_context.add_class('selected-color')
self._set_listbox(self._global_search_listbox)
if self._ui.search_entry.get_text():
self._start_search()
self._remove_new_jid_row()
self._ui.listbox.invalidate_filter()
else:
self._ui.search_entry.set_text('')
image_style_context.remove_class('selected-color')
self._set_listbox(self._ui.listbox)
self._global_search_listbox.remove_all()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment