comparison frontends/src/primitivus/contact_list.py @ 646:f7804c52c754

primitivus: disconnected contact crash fix fix IndexError when selecting a contact and hiding disconnected ones fix bug 47
author Goffi <goffi@goffi.org>
date Sun, 22 Sep 2013 01:49:19 +0200
parents 84a6e83157c2
children 0b9bd47dffcd
comparison
equal deleted inserted replaced
645:17bd09cd1001 646:f7804c52c754
48 def update(self): 48 def update(self):
49 """Update display, keep focus""" 49 """Update display, keep focus"""
50 widget, position = self.frame.body.get_focus() 50 widget, position = self.frame.body.get_focus()
51 self.frame.body = self.__buildList() 51 self.frame.body = self.__buildList()
52 if position: 52 if position:
53 self.frame.body.set_focus(position) 53 try:
54 self.frame.body.set_focus(position)
55 except IndexError:
56 pass
54 self.host.redraw() 57 self.host.redraw()
55 58
56 def update_jid(self, jid): 59 def update_jid(self, jid):
57 self.update() 60 self.update()
58 61