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
|
return True
|
||||||
|
|
||||||
def keypress(self,size,key):
|
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)
|
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.keypress(size,newK)
|
||||||
self._w.get_body().set_focus(1)
|
self._w.get_body().set_focus(1)
|
||||||
else:
|
else:
|
||||||
@@ -564,26 +564,11 @@ class OptCols(urwid.WidgetWrap):
|
|||||||
# callbacks map the text contents to its assigned callback.
|
# callbacks map the text contents to its assigned callback.
|
||||||
self.callbacks = []
|
self.callbacks = []
|
||||||
for cmd in tuples:
|
for cmd in tuples:
|
||||||
splitcmd = cmd[0].split()
|
key = reduce(lambda s,(f,t):s.replace(f,t), [ \
|
||||||
key = ''
|
('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'), \
|
||||||
for part in splitcmd:
|
('left', '<-'), ('right', '->'), \
|
||||||
if part == 'ctrl':
|
('page up', 'Page Up'), ('page down', 'Page Down'), \
|
||||||
key+='Ctrl+'
|
('esc', 'ESC'), ('enter', 'Enter'), ('f10','F10')], cmd[0])
|
||||||
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
|
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
callback = self.debugClick
|
callback = self.debugClick
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
""" wicd-curses. (curses/urwid-based) console interface to wicd
|
""" wicd-curses. (curses/urwid-based) console interface to wicd
|
||||||
|
|
||||||
Provides the a console UI for wicd, so that people with broken X servers can
|
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. ;-)
|
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):
|
def init_other_optcols(self):
|
||||||
# The "tabbed" preferences dialog
|
# The "tabbed" preferences dialog
|
||||||
self.prefCols = OptCols( [ ('meta enter','OK'),
|
self.prefCols = OptCols( [ ('f10','OK'),
|
||||||
('meta [','Tab Left',),
|
('page up','Tab Left',),
|
||||||
('meta ]','Tab Right'),
|
('page down', 'Tab Right'),
|
||||||
('esc','Cancel') ], self.handle_keys)
|
('esc','Cancel') ], self.handle_keys)
|
||||||
self.confCols = OptCols( [ ('meta enter','OK'),
|
self.confCols = OptCols( [ ('f10','OK'),
|
||||||
('esc','Cancel') ],self.handle_keys)
|
('esc','Cancel') ],self.handle_keys)
|
||||||
|
|
||||||
# Does what it says it does
|
# Does what it says it does
|
||||||
@@ -902,7 +902,7 @@ class appGUI():
|
|||||||
if k == 'esc' or k == 'q' or k == 'Q':
|
if k == 'esc' or k == 'q' or k == 'Q':
|
||||||
self.restore_primary()
|
self.restore_primary()
|
||||||
break
|
break
|
||||||
if k == 'meta enter':
|
if k == 'f10':
|
||||||
self.diag.save_settings()
|
self.diag.save_settings()
|
||||||
self.restore_primary()
|
self.restore_primary()
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ Delete the selected wired network profile (from the wired network combo box at t
|
|||||||
.TP
|
.TP
|
||||||
.BR F2
|
.BR F2
|
||||||
Rename the selected wired network profile (from the wired network combo box at the top)
|
Rename the selected wired network profile (from the wired network combo box at the top)
|
||||||
.\".PP
|
|
||||||
.\"The following are not implemented yet:
|
|
||||||
.TP
|
.TP
|
||||||
.BR S
|
.BR S
|
||||||
.\"Bring up the script selector for the selected network (requires superuser privileges)
|
.\"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
|
.I ~/.wicd/WHEREAREMYFILES
|
||||||
Reminder that your network configuration files are not here ;-)
|
Reminder that your network configuration files are not here ;-)
|
||||||
.PP
|
.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"
|
.SH "SEE ALSO"
|
||||||
.BR wicd-client (1),
|
.BR wicd-client (1),
|
||||||
.BR wicd (8)
|
.BR wicd (8)
|
||||||
|
|||||||
Reference in New Issue
Block a user