ui: add ability to change button label in SomethingFailed message box

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
Olivier Gayot 2022-06-15 11:51:34 +02:00
parent a93202e0a1
commit 2ee5550c9e
1 changed files with 3 additions and 2 deletions

View File

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