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

Made M^ and C^ into Alt+ and Ctrl+ respectively in OptCols.

Rearranged the OptCols for the preferences dialog to match those in the others.
This commit is contained in:
Andrew Psaltis
2009-05-23 00:32:29 -04:00
parent 650b451ce2
commit 6d00df2675
2 changed files with 13 additions and 11 deletions

View File

@@ -558,6 +558,7 @@ class ClickCols(urwid.WidgetWrap):
class OptCols(urwid.WidgetWrap):
# tuples = [(key,desc)], on_event gets passed a key
# attrs = (attr_key,attr_desc)
# handler = function passed the key of the "button" pressed
# mentions of 'left' and right will be converted to <- and -> respectively
def __init__(self,tuples,handler,attrs=('body','infobar'),debug=False):
# Find the longest string. Keys for this bar should be no greater than
@@ -578,9 +579,11 @@ class OptCols(urwid.WidgetWrap):
key = ''
for part in splitcmd:
if part == 'ctrl':
key+='C^'
key+='Ctrl+'
elif part == 'meta':
key+='M^'
# If anyone has a problem with this, they can bother me
# about it.
key+='Alt+'
else:
if part == 'left':
key += '<-'
@@ -588,6 +591,8 @@ class OptCols(urwid.WidgetWrap):
key += '->'
elif part == 'esc':
key += 'ESC'
elif part == 'enter':
key += 'Enter'
else:
key += part