1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-21 21:38:06 +01:00

Support urwid 1.0.0

This commit is contained in:
David Paleino
2011-10-17 22:14:40 +02:00
parent ab80fc76e9
commit 469a85b1b1
2 changed files with 15 additions and 3 deletions

View File

@@ -478,7 +478,11 @@ class Dialog2(urwid.WidgetWrap):
while not keys:
keys = ui.get_input()
for k in keys:
if urwid.is_mouse_event(k):
if urwid.VERSION < (1, 0, 0):
check_mouse_event = urwid.is_mouse_event
else:
check_mouse_event = urwid.util.is_mouse_event
if check_mouse_event(k):
event, button, col, row = k
overlay.mouse_event( size,
event, button, col, row,