[avm] allow to search contact in roster by typing the middle of the name, not only the begining

This commit is contained in:
Yann Leboulanger 2008-08-01 10:26:29 +00:00
parent 9130004249
commit b9fc3556c7
1 changed files with 3 additions and 4 deletions

View File

@ -1418,10 +1418,9 @@ class RosterWindow:
##############################################################################
def _search_roster_func(self, model, column, key, titer):
if model[titer][C_NAME].decode('utf-8').lower().startswith(
gobject.markup_escape_text(key.lower())):
return False
return True
key = gobject.markup_escape_text(key.lower())
name = model[titer][C_NAME].decode('utf-8').lower()
return not (key in name)
def refilter_shown_roster_items(self):
self.filtering = True