changeset 911:b12706d164d7

primitivus: removed deprecated use of set_focus
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 15:04:03 +0100
parents 9754c0ebadba
children b70fb2ac5997
files frontends/src/primitivus/card_game.py frontends/src/primitivus/chat.py frontends/src/primitivus/contact_list.py frontends/src/primitivus/primitivus
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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":
--- 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
--- 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):