Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
ecc80631 by wurstsalat at 2024-07-22T21:59:35+02:00
fix: SearchView: Fix search when changing scope for the same search string

Fixes #11915

- - - - -


2 changed files:

- gajim/data/gui/search_view.ui
- gajim/gtk/search_view.py


Changes:

=====================================
gajim/data/gui/search_view.ui
=====================================
@@ -236,8 +236,8 @@ after:yyyy-mm-dd</property>
         <property name="can-focus">True</property>
         <property name="receives-default">False</property>
         <property name="halign">center</property>
-        <property name="active">False</property>
         <property name="draw-indicator">True</property>
+        <signal name="toggled" handler="_on_search_all_toggled" swapped="no"/>
       </object>
       <packing>
         <property name="expand">False</property>


=====================================
gajim/gtk/search_view.py
=====================================
@@ -110,6 +110,10 @@ def _clear_results(self) -> None:
         self._ui.results_listbox.set_header_func(self._header_func)
         self._ui.results_scrolled.get_vadjustment().set_value(0)
 
+    def _on_search_all_toggled(self, _checkbutton: Gtk.CheckButton) -> None:
+        # Reset state to allow changing scope while not changing search string
+        self._last_search_string = ''
+
     def _on_search(self, entry: Gtk.Entry) -> None:
         text = entry.get_text()
         if text == self._last_search_string:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ecc806318e59876e1fb0d7b11614a5052835bbb0

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ecc806318e59876e1fb0d7b11614a5052835bbb0
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to