Merge pull request #1314 from ogayot/something-failed-label

ui: add ability to change button label in SomethingFailed message box
This commit is contained in:
Olivier Gayot 2022-06-20 09:30:30 +02:00 committed by GitHub
commit 01db706867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -344,9 +344,10 @@ def rewrap(text):
class SomethingFailed(Stretchy): class SomethingFailed(Stretchy):
def __init__(self, parent, msg, stderr): def __init__(self, parent, msg, stderr,
*, btn_label: str = _("Close")) -> None:
self.parent = parent self.parent = parent
ok = other_btn(label=_("Close"), on_press=self.close) ok = other_btn(label=btn_label, on_press=self.close)
widgets = [ widgets = [
Text(msg), Text(msg),
Text(""), Text(""),