Philipp Hörist pushed to branch master at gajim / gajim


Commits:
4ff6073f by Daniel Brötzmann at 2019-08-16T18:46:00Z
GroupchatControl: Set search column for roster

- - - - -
623177a8 by Daniel Brötzmann at 2019-08-16T18:46:15Z
GroupchatControl: Add custom search func for roster

- - - - -


2 changed files:

- gajim/data/gui/groupchat_control.ui
- gajim/groupchat_control.py


Changes:

=====================================
gajim/data/gui/groupchat_control.ui
=====================================
@@ -432,6 +432,7 @@
                         <property name="can_focus">True</property>
                         <property name="border_width">1</property>
                         <property name="headers_visible">False</property>
+                        <property name="search_column">1</property>
                         <child internal-child="selection">
                           <object class="GtkTreeSelection" 
id="treeview-selection1"/>
                         </child>


=====================================
gajim/groupchat_control.py
=====================================
@@ -257,6 +257,8 @@ class GroupchatControl(ChatControlBase):
 
         self.setup_seclabel()
 
+        self.list_treeview.set_search_equal_func(self._search_func)
+
         # Send file
         self.sendfile_button = self.xml.get_object('sendfile_button')
         self.sendfile_button.set_action_name('win.send-file-' + \
@@ -609,6 +611,10 @@ class GroupchatControl(ChatControlBase):
             desc = app.css_config.get_font('.gajim-group-row')
             renderer.set_property('font-desc', desc)
 
+    @staticmethod
+    def _search_func(model, _column, search_text, iter_):
+        return search_text.lower() not in model[iter_][1].lower()
+
     @event_filter(['account', 'room_jid'])
     def _on_disco_update(self, _event):
         if self.parent_win is None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/3ad1d9955637b8a3d019ba2c2a99f4e57fb6107f...623177a86d6adb87b6aa739f156e433b872cb317

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/3ad1d9955637b8a3d019ba2c2a99f4e57fb6107f...623177a86d6adb87b6aa739f156e433b872cb317
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to