28 parent, wxID_ANY,
XO(
"Link account"), wxDefaultPosition, { 442, -1 },
29 wxDEFAULT_DIALOG_STYLE)
30{
31 SetMinSize({ 442, -1 });
33
34 s.StartVerticalLay();
35 {
36 s.StartInvisiblePanel(16);
37 {
38 s.SetBorder(0);
39
40 s.AddFixedText(
41 XO(
"We were unable to link your account. Please try again."),
42 false, 410);
43
44 s.AddSpace(0, 16, 0);
45
46 s.StartHorizontalLay(wxEXPAND, 0);
47 {
48 s.AddSpace(1, 0, 1);
49
50 s.AddButton(
XO(
"&Cancel"))
51 ->Bind(wxEVT_BUTTON, [this](auto) { EndModal(wxID_CANCEL); });
52
53 auto btn = s.AddButton(
XO(
"&Try again"));
54
55 btn->Bind(
56 wxEVT_BUTTON,
57 [this](auto)
58 {
61 EndModal(wxID_RETRY);
62 });
63
64 btn->SetDefault();
65 }
66 s.EndHorizontalLay();
67
68 }
69 s.EndInvisiblePanel();
70 }
71 s.EndVerticalLay();
72
73 Layout();
74 Fit();
75 Center();
76
77 Bind(
78 wxEVT_CHAR_HOOK,
79 [this](auto& evt)
80 {
81 if (!IsEscapeKey(evt))
82 {
83 evt.Skip();
84 return;
85 }
86
87 EndModal(wxID_CANCEL);
88 });
89}
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.
wxString ToWXString(const std::string &str)
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.