# HG changeset patch # User Goffi # Date 1395410643 -3600 # Node ID b12706d164d78651768746b8820ca6ae271c54f5 # Parent 9754c0ebadba466b67011721427b14de435ca516 primitivus: removed deprecated use of set_focus diff -r 9754c0ebadba -r b12706d164d7 frontends/src/primitivus/card_game.py --- a/frontends/src/primitivus/card_game.py Fri Mar 21 15:03:56 2014 +0100 +++ b/frontends/src/primitivus/card_game.py Fri Mar 21 15:04:03 2014 +0100 @@ -122,7 +122,7 @@ self.columns.column_types.append(('fixed', 3)) urwid.connect_signal(widget, 'click', self.__onClick) self.columns.contents.append((urwid.Text(''), ('weight', 1, False))) - self.columns.set_focus(1) + self.columns.focus_position = 1 def __onClick(self, card_wid): self._emit('click', card_wid) diff -r 9754c0ebadba -r b12706d164d7 frontends/src/primitivus/chat.py --- a/frontends/src/primitivus/chat.py Fri Mar 21 15:03:56 2014 +0100 +++ b/frontends/src/primitivus/chat.py Fri Mar 21 15:04:03 2014 +0100 @@ -323,7 +323,7 @@ if self.text_list.get_focus()[1] == len(self.content) - 2: #we don't change focus if user is not at the bottom #as that mean that he is probably watching discussion history - self.text_list.set_focus(len(self.content) - 1) + self.text_list.focus_position = len(self.content) - 1 self.host.redraw() if not self.host.x_notify.hasFocus(): if self.type == "one2one": diff -r 9754c0ebadba -r b12706d164d7 frontends/src/primitivus/contact_list.py --- a/frontends/src/primitivus/contact_list.py Fri Mar 21 15:03:56 2014 +0100 +++ b/frontends/src/primitivus/contact_list.py Fri Mar 21 15:04:03 2014 +0100 @@ -54,7 +54,7 @@ self.frame.body = self.__buildList() if position: try: - self.frame.body.set_focus(position) + self.frame.body.focus_position = position except IndexError: pass self.host.redraw() @@ -101,7 +101,7 @@ continue # there's sometimes a leading space if text.strip() == value.strip(): - self.frame.body.set_focus(idx) + self.frame.body.focus_position = idx if select: self.__contactClicked(widget, True) return diff -r 9754c0ebadba -r b12706d164d7 frontends/src/primitivus/primitivus --- a/frontends/src/primitivus/primitivus Fri Mar 21 15:03:56 2014 +0100 +++ b/frontends/src/primitivus/primitivus Fri Mar 21 15:04:03 2014 +0100 @@ -361,7 +361,7 @@ assert(len(self.center_part.widget_list)<=2) wid_idx = len(self.center_part.widget_list)-1 self.center_part.widget_list[wid_idx] = urwid.Filler(urwid.Text('')) - self.center_part.set_focus(0) + self.center_part.focus_position = 0 self.redraw() def addProgress (self, id, message):