mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
wicd-curses: add support for "S" key to save instead of F10, because F10 is often intercepted by the terminal emulator
This commit is contained in:
@@ -711,7 +711,7 @@ class OptCols(urwid.WidgetWrap):
|
||||
('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'),
|
||||
('left', '<-'), ('right', '->'),
|
||||
('page up', 'Page Up'), ('page down', 'Page Down'),
|
||||
('esc', 'ESC'), ('enter', 'Enter'), ('f10', 'F10')], cmd[0])
|
||||
('esc', 'ESC'), ('enter', 'Enter'), ('s', 'S')], cmd[0])
|
||||
|
||||
if debug:
|
||||
callback = self.debugClick
|
||||
|
||||
@@ -756,13 +756,13 @@ class appGUI():
|
||||
def init_other_optcols(self):
|
||||
""" Init "tabbed" preferences dialog. """
|
||||
self.prefCols = OptCols([
|
||||
('f10', _('OK')),
|
||||
('S', _('Save')),
|
||||
('page up', _('Tab Left'), ),
|
||||
('page down', _('Tab Right')),
|
||||
('esc', _('Cancel'))
|
||||
], self.handle_keys)
|
||||
self.confCols = OptCols([
|
||||
('f10', _('OK')),
|
||||
('S', _('Save')),
|
||||
('esc', _('Cancel'))
|
||||
], self.handle_keys)
|
||||
|
||||
@@ -1121,7 +1121,10 @@ class appGUI():
|
||||
if k == 'esc' or k == 'q' or k == 'Q':
|
||||
self.restore_primary()
|
||||
break
|
||||
if k == 'f10':
|
||||
# F10 has been changed to S to avoid using function keys,
|
||||
# which are often caught by the terminal emulator.
|
||||
# But F10 still works, because it doesn't hurt and some users might be used to it.
|
||||
if k == 'f10' or k == 'S' or k == 's':
|
||||
self.diag.save_settings()
|
||||
self.restore_primary()
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user