144{
146
148
149 wxButton *retryButton;
150 wxButton *quitButton;
151
153 S.StartVerticalLay(wxEXPAND, 1);
154 {
156 S.StartHorizontalLay(wxALIGN_RIGHT, 0);
157 {
159 XO(
"The following configuration file could not be accessed:\n\n"
160 "\t%s\n\n"
161 "This could be caused by many reasons, but the most likely are that "
162 "the disk is full or you do not have write permissions to the file. "
163 "\n\n"
164 "You can attempt to correct the issue and then click \"Retry\" to continue.\n\n"
165 "If you choose to \"Quit Audacity\", your project may be left in an unsaved "
166 "state which will be recovered the next time you open it.")
168 false,
169 500);
170 }
171 S.EndHorizontalLay();
172
174 S.StartHorizontalLay(wxALIGN_RIGHT, 0);
175 {
176
177
178 wxButton *b =
S.Id(wxID_HELP).AddBitmapButton(wxBitmap(Help_xpm));
179 b->SetToolTip(
XO(
"Help").Translation() );
180 b->SetLabel(
XO(
"Help").Translation());
181
182 b =
S.Id(wxID_CANCEL).AddButton(
XXO(
"&Quit Audacity"));
183 b =
S.Id(wxID_OK).AddButton(
XXO(
"&Retry"));
184 dlg.SetAffirmativeId(wxID_OK);
185
186 b->SetDefault();
187 b->SetFocus();
188 }
189 S.EndHorizontalLay();
190 }
192
193 dlg.Layout();
194 dlg.GetSizer()->Fit(&dlg);
195 dlg.SetMinSize(dlg.GetSize());
196 dlg.Center();
197
198 auto onButton = [&](wxCommandEvent &e)
199 {
200 dlg.EndModal(e.GetId());
201 };
202
203 dlg.Bind(wxEVT_BUTTON, onButton);
204
205 switch (dlg.ShowModal())
206 {
207 case wxID_HELP:
208
209
213 "Error:_Audacity_settings_file_unwritable");
214 break;
215
216 case wxID_CANCEL:
217 _exit(-1);
218 break;
219 }
220
221 dlg.Unbind(wxEVT_BUTTON, onButton);
222}
XXO("&Cut/Copy/Paste Toolbar")
static const wxString HelpHostname
static const wxString HelpServerHomeDir
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.