From 7c8fe132eb306ccdd332acd263fbd0d6b7d09fc8 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 27 Apr 2012 22:36:58 +0200 Subject: Update the roster search functions --- src/tabs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tabs.py b/src/tabs.py index e33b5a9a..300f52a9 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -2187,18 +2187,18 @@ class RosterInfoTab(Tab): return True def set_roster_filter_slow(self, txt): - roster._contact_filter = (jid_and_name_match_slow, txt) + roster.jids_filter = (jid_and_name_match_slow, txt) self.roster_win.refresh(roster) return False def set_roster_filter(self, txt): - roster._contact_filter = (jid_and_name_match, txt) + roster.contact_filter = (jid_and_name_match, txt) self.roster_win.refresh(roster) return False def on_search_terminate(self, txt): curses.curs_set(0) - roster._contact_filter = None + roster.contact_filter = None self.reset_help_message() return False @@ -2805,6 +2805,8 @@ def jid_and_name_match(contact, txt): return True if txt in JID(contact.bare_jid).user: return True + if txt in contact.name: + return True return False def jid_and_name_match_slow(contact, txt): -- cgit v1.2.3