summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch')
-rw-r--r--net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch b/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch
new file mode 100644
index 000000000000..9a0bae6c9625
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch
@@ -0,0 +1,43 @@
+=== 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()
+