changeset 65:090f3e0754d3

fix for recent urwid versions (> 1.1.0)
author Goffi <goffi@goffi.org>
date Mon, 25 Mar 2013 13:10:57 +0100
parents 5cef69971f23
children 287ff3e1edd1
files urwid_satext/sat_widgets.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/urwid_satext/sat_widgets.py	Mon Mar 25 13:10:21 2013 +0100
+++ b/urwid_satext/sat_widgets.py	Mon Mar 25 13:10:57 2013 +0100
@@ -735,9 +735,8 @@
         name_len = len(name_txt)
         current_menu = self.menus[self.name_list[self.selected]]
         current_menu.setOrigX(name_len)
-        self.columns.widget_list[0] = current_name
-        self.columns.column_types[0]=('fixed', name_len)
-        self.columns.widget_list[1] = current_menu
+        self.columns.contents[0] = (current_name, ('given', name_len, False))
+        self.columns.contents[1] = (current_menu, ('weight', 1, False))
 
     def keypress(self, size, key):
         if key=='up':
@@ -750,7 +749,7 @@
                 self.__showSelected()
         elif key=='right':
             if self.columns.get_focus_column()==0 and \
-                (isinstance(self.columns.widget_list[1], urwid.Text) or \
+                (isinstance(self.columns.contents[1][0], urwid.Text) or \
                 self.menus[self.name_list[self.selected]].getMenuSize()==0):
                 return #if we have no menu or the menu is empty, we don't go the right column