This commit is contained in:
Kovid Goyal 2022-03-11 15:47:39 +05:30
parent 5bb6b29ca3
commit 8613c6e1cd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 5 deletions

View File

@ -904,7 +904,7 @@ class Window:
if data['type'] == 'confirm':
get_boss().confirm(
message, callback, window=self, confirm_on_cancel=bool(data.get('confirm_on_cancel')),
confirm_on_accept=bool(data.get('confirm_on_accept')))
confirm_on_accept=bool(data.get('confirm_on_accept', True)))
elif data['type'] == 'choose':
get_boss().choose(
message, callback, *data['choices'], window=self, default=data.get('default', ''))

View File

@ -33,7 +33,7 @@ with SharedMemory(
if shm.read(1) == b'\x01':
break
response = json.loads(shm.read_data_with_size())
if is_confirm:
response = 'yes' if response else 'no'
if response:
print(response, flush=True)
if is_confirm:
response = 'yes' if response else 'no'
if response:
print(response, flush=True)