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:
parent
a93202e0a1
commit
2ee5550c9e
|
@ -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(""),
|
||||||
|
|
Loading…
Reference in New Issue