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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user