diff --git a/src/roster_window.py b/src/roster_window.py index c52345755..7da8e5293 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -5323,6 +5323,11 @@ class RosterWindow: self._last_selected_contact.append((jid, account)) self.draw_contact(jid, account, selected = True) + def search_roster_func(self, model, column, key, iter): + if model[iter][C_NAME].decode('utf-8').startswith(gobject.markup_escape_text(key)): + return False + return True + def setup_for_osx(self): # Massage the GTK menu so it will match up to the OS/X nib style menu # when passed to sync-menu and merged @@ -5565,6 +5570,9 @@ class RosterWindow: col.set_visible(False) self.tree.set_expander_column(col) + # set search function + self.tree.set_search_equal_func(self.search_roster_func) + # signals self.TARGET_TYPE_URI_LIST = 80 TARGETS = [('MY_TREE_MODEL_ROW', gtk.TARGET_SAME_APP | gtk.TARGET_SAME_WIDGET,