void-packages/srcpkgs/wicd/patches/835_834.diff

44 lines
1.3 KiB
Diff

=== modified file 'curses/curses_misc.py'
--- curses/curses_misc.py 2012-11-15 09:26:21 +0000
+++ curses/curses_misc.py 2012-11-16 09:22:47 +0000
@@ -352,7 +352,7 @@
if urwid.VERSION < (1, 1, 0):
self.focus = focus
else:
- self.focus_position = focus
+ self._w.focus_position = focus
self.callback = callback
self.user_args = user_args
@@ -368,7 +368,10 @@
if urwid.VERSION < (1, 1, 0):
self.focus = index
else:
- self.focus_position = index
+ try:
+ self._w.focus_position = index
+ except IndexError:
+ pass
# API changed between urwid 0.9.8.4 and 0.9.9
try:
@@ -386,7 +389,7 @@
if urwid.VERSION < (1, 1, 0):
index = self.focus
else:
- index = self.focus_position
+ index = self._w.focus_position
self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
attrs=self.attrs,focus_attr=self.focus_attr)
@@ -434,7 +437,7 @@
if urwid.VERSION < (1, 1, 0):
return None, self.focus
else:
- return None, self.focus_position
+ return None, self._w.focus_position
def get_sensitive(self):
return self.cbox.get_sensitive()