mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 23:24:15 +02:00
supporting custom confirmation / deny button label
This commit is contained in:
@@ -28,9 +28,9 @@ class AsyncAction(QThread, ProcessWatcher):
|
||||
self.wait_confirmation = False
|
||||
self.confirmation_res = None
|
||||
|
||||
def request_confirmation(self, title: str, body: str, options: List[InputViewComponent] = None) -> bool:
|
||||
def request_confirmation(self, title: str, body: str, options: List[InputViewComponent] = None, confirmation_label: str = None, deny_label: str = None) -> bool:
|
||||
self.wait_confirmation = True
|
||||
self.signal_confirmation.emit({'title': title, 'body': body, 'options': options})
|
||||
self.signal_confirmation.emit({'title': title, 'body': body, 'components': options, 'confirmation_label': confirmation_label, 'deny_label': deny_label})
|
||||
self.wait_user()
|
||||
return self.confirmation_res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user