1
0
mirror of https://github.com/gryf/wicd.git synced 2026-02-09 10:05:49 +01:00

curses/curses_misc.py:

added support for Meta and Ctrl being applied to keys in OptCols
curses/wicd-curses.py
  Changed the colors slightly, colorized the clock.
This commit is contained in:
Andrew Psaltis
2009-03-04 00:56:17 -05:00
parent a290b12e68
commit 0dfe5432bd
2 changed files with 25 additions and 14 deletions

View File

@@ -545,12 +545,21 @@ class OptCols(urwid.WidgetWrap):
# callbacks map the text contents to its assigned callback.
self.callbacks = []
for cmd in tuples:
if cmd[0] == 'left':
key = '<-'
elif cmd[0] == 'right':
key = '->'
else:
key = cmd[0]
splitcmd = cmd[0].split()
key = ''
for part in splitcmd:
if part == 'ctrl':
key+='C^'
elif part == 'meta':
key+='M^'
else:
if part == 'left':
key += '<-'
elif part == 'right':
key += '->'
else:
key += part
#theText = urwid.Text([(attrs[0],cmd[0]),(attrs[1],cmd[1])])
if debug:
callback = self.debugClick