mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
fix potential urwid compatibility problem
This commit is contained in:
@@ -361,7 +361,11 @@ class ComboBox(urwid.WidgetWrap):
|
|||||||
|
|
||||||
def set_focus(self,index):
|
def set_focus(self,index):
|
||||||
self.focus = index
|
self.focus = 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))
|
self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
|
||||||
|
except AttributeError:
|
||||||
|
self.cbox._w = SelText(self.list[index]+self.DOWN_ARROW)
|
||||||
if self.overlay:
|
if self.overlay:
|
||||||
self.overlay._listbox.set_focus(index)
|
self.overlay._listbox.set_focus(index)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user