[avm] allow to search contact in roster by typing the middle of the name, not only the begining
This commit is contained in:
parent
9130004249
commit
b9fc3556c7
|
@ -1418,10 +1418,9 @@ class RosterWindow:
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
def _search_roster_func(self, model, column, key, titer):
|
def _search_roster_func(self, model, column, key, titer):
|
||||||
if model[titer][C_NAME].decode('utf-8').lower().startswith(
|
key = gobject.markup_escape_text(key.lower())
|
||||||
gobject.markup_escape_text(key.lower())):
|
name = model[titer][C_NAME].decode('utf-8').lower()
|
||||||
return False
|
return not (key in name)
|
||||||
return True
|
|
||||||
|
|
||||||
def refilter_shown_roster_items(self):
|
def refilter_shown_roster_items(self):
|
||||||
self.filtering = True
|
self.filtering = True
|
||||||
|
|
Loading…
Reference in New Issue