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