comparison frontends/src/primitivus/contact_list.py @ 911:b12706d164d7

primitivus: removed deprecated use of set_focus
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 15:04:03 +0100
parents 084b52afdceb
children 6f1e03068b5f
comparison
equal deleted inserted replaced
910:9754c0ebadba 911:b12706d164d7
52 """Update display, keep focus""" 52 """Update display, keep focus"""
53 widget, position = self.frame.body.get_focus() 53 widget, position = self.frame.body.get_focus()
54 self.frame.body = self.__buildList() 54 self.frame.body = self.__buildList()
55 if position: 55 if position:
56 try: 56 try:
57 self.frame.body.set_focus(position) 57 self.frame.body.focus_position = position
58 except IndexError: 58 except IndexError:
59 pass 59 pass
60 self.host.redraw() 60 self.host.redraw()
61 61
62 def update_jid(self, jid): 62 def update_jid(self, jid):
99 else: 99 else:
100 # Divider instance 100 # Divider instance
101 continue 101 continue
102 # there's sometimes a leading space 102 # there's sometimes a leading space
103 if text.strip() == value.strip(): 103 if text.strip() == value.strip():
104 self.frame.body.set_focus(idx) 104 self.frame.body.focus_position = idx
105 if select: 105 if select:
106 self.__contactClicked(widget, True) 106 self.__contactClicked(widget, True)
107 return 107 return
108 except AttributeError: 108 except AttributeError:
109 pass 109 pass