mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
Adjusted the keystrokes in wicd-curses to support 8-bit terminals (like xterms by default).
Thanks to DarkStarSword for the patch.
This commit is contained in:
@@ -211,9 +211,9 @@ class TabColumns(urwid.WidgetWrap):
|
||||
return True
|
||||
|
||||
def keypress(self,size,key):
|
||||
if key == "meta [" or key == "meta ]":
|
||||
if key == "page up" or key == "page down":
|
||||
self._w.get_body().set_focus(0)
|
||||
newK = 'left' if key[-1] == '[' else 'right'
|
||||
newK = 'left' if key == "page up" else 'right'
|
||||
self.keypress(size,newK)
|
||||
self._w.get_body().set_focus(1)
|
||||
else:
|
||||
@@ -564,26 +564,11 @@ class OptCols(urwid.WidgetWrap):
|
||||
# callbacks map the text contents to its assigned callback.
|
||||
self.callbacks = []
|
||||
for cmd in tuples:
|
||||
splitcmd = cmd[0].split()
|
||||
key = ''
|
||||
for part in splitcmd:
|
||||
if part == 'ctrl':
|
||||
key+='Ctrl+'
|
||||
elif part == 'meta':
|
||||
# If anyone has a problem with this, they can bother me
|
||||
# about it.
|
||||
key+='Alt+'
|
||||
else:
|
||||
if part == 'left':
|
||||
key += '<-'
|
||||
elif part == 'right':
|
||||
key += '->'
|
||||
elif part == 'esc':
|
||||
key += 'ESC'
|
||||
elif part == 'enter':
|
||||
key += 'Enter'
|
||||
else:
|
||||
key += part
|
||||
key = reduce(lambda s,(f,t):s.replace(f,t), [ \
|
||||
('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'), \
|
||||
('left', '<-'), ('right', '->'), \
|
||||
('page up', 'Page Up'), ('page down', 'Page Down'), \
|
||||
('esc', 'ESC'), ('enter', 'Enter'), ('f10','F10')], cmd[0])
|
||||
|
||||
if debug:
|
||||
callback = self.debugClick
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
""" wicd-curses. (curses/urwid-based) console interface to wicd
|
||||
|
||||
Provides the a console UI for wicd, so that people with broken X servers can
|
||||
at least get a network connection. Or those who don't like using X. ;-)
|
||||
Provides a console UI for wicd, so that people with broken X servers can
|
||||
at least get a network connection. Or those who don't like using X and/or GTK.
|
||||
|
||||
"""
|
||||
|
||||
@@ -583,11 +583,11 @@ class appGUI():
|
||||
|
||||
def init_other_optcols(self):
|
||||
# The "tabbed" preferences dialog
|
||||
self.prefCols = OptCols( [ ('meta enter','OK'),
|
||||
('meta [','Tab Left',),
|
||||
('meta ]','Tab Right'),
|
||||
self.prefCols = OptCols( [ ('f10','OK'),
|
||||
('page up','Tab Left',),
|
||||
('page down', 'Tab Right'),
|
||||
('esc','Cancel') ], self.handle_keys)
|
||||
self.confCols = OptCols( [ ('meta enter','OK'),
|
||||
self.confCols = OptCols( [ ('f10','OK'),
|
||||
('esc','Cancel') ],self.handle_keys)
|
||||
|
||||
# Does what it says it does
|
||||
@@ -902,7 +902,7 @@ class appGUI():
|
||||
if k == 'esc' or k == 'q' or k == 'Q':
|
||||
self.restore_primary()
|
||||
break
|
||||
if k == 'meta enter':
|
||||
if k == 'f10':
|
||||
self.diag.save_settings()
|
||||
self.restore_primary()
|
||||
break
|
||||
|
||||
@@ -60,8 +60,6 @@ Delete the selected wired network profile (from the wired network combo box at t
|
||||
.TP
|
||||
.BR F2
|
||||
Rename the selected wired network profile (from the wired network combo box at the top)
|
||||
.\".PP
|
||||
.\"The following are not implemented yet:
|
||||
.TP
|
||||
.BR S
|
||||
.\"Bring up the script selector for the selected network (requires superuser privileges)
|
||||
@@ -75,13 +73,6 @@ Raise the Ad-Hoc network creation dialog
|
||||
.I ~/.wicd/WHEREAREMYFILES
|
||||
Reminder that your network configuration files are not here ;-)
|
||||
.PP
|
||||
These following are not used yet:
|
||||
.TP
|
||||
.I %LIB%colors.py
|
||||
Tentative location of the system color schemes
|
||||
.TP
|
||||
.I ~/.wicd/colors.py
|
||||
Custom color schemes.
|
||||
.SH "SEE ALSO"
|
||||
.BR wicd-client (1),
|
||||
.BR wicd (8)
|
||||
|
||||
Reference in New Issue
Block a user