* [gentoo-commits] gentoo-x86 commit in net-misc/wicd/files: wicd-1.7.2.4-second-urwid.patch wicd-1.7.2.4-urwid.patch
@ 2012-11-16 18:03 Thomas Kahle (tomka)
0 siblings, 0 replies; only message in thread
From: Thomas Kahle (tomka) @ 2012-11-16 18:03 UTC (permalink / raw
To: gentoo-commits
tomka 12/11/16 18:03:11
Added: wicd-1.7.2.4-second-urwid.patch
wicd-1.7.2.4-urwid.patch
Log:
Fix urwid-1.1 compatibility (bug 441966)
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0x89DEB219565C32BC)
Revision Changes Path
1.1 net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch?rev=1.1&content-type=text/plain
Index: wicd-1.7.2.4-second-urwid.patch
===================================================================
=== 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()
1.1 net-misc/wicd/files/wicd-1.7.2.4-urwid.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.2.4-urwid.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.2.4-urwid.patch?rev=1.1&content-type=text/plain
Index: wicd-1.7.2.4-urwid.patch
===================================================================
=== modified file 'curses/curses_misc.py'
--- curses/curses_misc.py 2012-05-06 15:16:15 +0000
+++ curses/curses_misc.py 2012-11-15 09:26:21 +0000
@@ -349,7 +349,10 @@
# We need this to pick our keypresses
self.use_enter = use_enter
- self.focus = focus
+ if urwid.VERSION < (1, 1, 0):
+ self.focus = focus
+ else:
+ self.focus_position = focus
self.callback = callback
self.user_args = user_args
@@ -362,7 +365,11 @@
self.list = list
def set_focus(self,index):
- self.focus = index
+ if urwid.VERSION < (1, 1, 0):
+ self.focus = index
+ else:
+ self.focus_position = index
+
# API changed between urwid 0.9.8.4 and 0.9.9
try:
self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
@@ -376,16 +383,21 @@
def build_combobox(self,parent,ui,row):
str,trash = self.label.get_text()
- self.cbox = DynWrap(SelText([self.list[self.focus]+self.DOWN_ARROW]),
+ if urwid.VERSION < (1, 1, 0):
+ index = self.focus
+ else:
+ index = self.focus_position
+
+ self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
attrs=self.attrs,focus_attr=self.focus_attr)
if str != '':
w = urwid.Columns([('fixed',len(str),self.label),self.cbox],
dividechars=1)
- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
+ self.overlay = self.ComboSpace(self.list,parent,ui,index,
pos=(len(str)+1,row))
else:
w = urwid.Columns([self.cbox])
- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
+ self.overlay = self.ComboSpace(self.list,parent,ui,index,
pos=(0,row))
self._w = w
@@ -419,7 +431,10 @@
if self.overlay:
return self.overlay._listbox.get_focus()
else:
- return None,self.focus
+ if urwid.VERSION < (1, 1, 0):
+ return None, self.focus
+ else:
+ return None, self.focus_position
def get_sensitive(self):
return self.cbox.get_sensitive()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-16 18:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 18:03 [gentoo-commits] gentoo-x86 commit in net-misc/wicd/files: wicd-1.7.2.4-second-urwid.patch wicd-1.7.2.4-urwid.patch Thomas Kahle (tomka)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox