primitivus: removed deprecated use of set_focus
This commit is contained in:
parent
3be53bdc69
commit
7feab1c6d9
4 changed files with 5 additions and 5 deletions
|
|
@ -122,7 +122,7 @@ class Hand(urwid.WidgetWrap):
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
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":
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
|
|||
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 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
|
|||
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
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ class PrimitivusApp(QuickApp, InputHistory):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue