Use a as the default accelerator rather than t
This commit is contained in:
parent
5ba92d06cf
commit
702da542dd
@ -485,12 +485,12 @@ class Boss:
|
|||||||
wid = 0 if window is None else window.id
|
wid = 0 if window is None else window.id
|
||||||
overlay_window = self.choose(
|
overlay_window = self.choose(
|
||||||
_('A program wishes to control kitty.\n\n'
|
_('A program wishes to control kitty.\n\n'
|
||||||
'Password: {0}\n' 'Action: {1}\n\n'
|
'Action: {1}\n' 'Password: {0}\n\n'
|
||||||
'Note that allowing the password will allow all future actions using the same password, in this kitty instance.'
|
'Note that allowing the password will allow all future actions using the same password, in this kitty instance.'
|
||||||
).format(styled(pcmd['password'], fg='yellow'), styled(pcmd['cmd'], fg='magenta')),
|
).format(styled(pcmd['password'], fg='yellow'), styled(pcmd['cmd'], fg='magenta')),
|
||||||
partial(self.remote_cmd_permission_received, pcmd, wid, peer_id),
|
partial(self.remote_cmd_permission_received, pcmd, wid, peer_id),
|
||||||
't;green:Allow this request', 'p;yellow:Allow this password', 'r;magenta:Deny this request', 'd;red:Deny this password',
|
'a;green:Allow this request', 'p;yellow:Allow this password', 'r;magenta:Deny this request', 'd;red:Deny this password',
|
||||||
window=window, default='t'
|
window=window, default='a'
|
||||||
)
|
)
|
||||||
if overlay_window is None:
|
if overlay_window is None:
|
||||||
return False
|
return False
|
||||||
@ -509,7 +509,7 @@ class Boss:
|
|||||||
no_response = pcmd.get('no_response') or False
|
no_response = pcmd.get('no_response') or False
|
||||||
if not no_response:
|
if not no_response:
|
||||||
response = {'ok': False, 'error': 'The user rejected this ' + ('request' if choice == 'r' else 'password')}
|
response = {'ok': False, 'error': 'The user rejected this ' + ('request' if choice == 'r' else 'password')}
|
||||||
elif choice in ('t', 'p'):
|
elif choice in ('a', 'p'):
|
||||||
if choice == 'p':
|
if choice == 'p':
|
||||||
set_user_password_allowed(pcmd['password'], True)
|
set_user_password_allowed(pcmd['password'], True)
|
||||||
response = self._execute_remote_command(pcmd, window, peer_id)
|
response = self._execute_remote_command(pcmd, window, peer_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user