mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
More robust handling of default curves:
When looking for default curves, EQDefaultCurves.xml is searched for in the DataDir first, then the exeDir, then the error dialog is popped up. Error dialog stays open while user visits web site to get EQDefaultCurves.xml. The 'normal' set of curves EQCurves.xml is still in DataDir.
This commit is contained in:
@@ -43,10 +43,12 @@ class ErrorDialog : public wxDialog
|
||||
ErrorDialog(wxWindow *parent,
|
||||
const wxString & dlogTitle,
|
||||
const wxString & message,
|
||||
const wxString & helpURL);
|
||||
const wxString & helpURL,
|
||||
const bool Close = true);
|
||||
|
||||
private:
|
||||
wxString dhelpURL;
|
||||
bool dClose;
|
||||
|
||||
void OnOk( wxCommandEvent &event );
|
||||
void OnHelp( wxCommandEvent &event );
|
||||
@@ -63,10 +65,12 @@ ErrorDialog::ErrorDialog(
|
||||
wxWindow *parent,
|
||||
const wxString & dlogTitle,
|
||||
const wxString & message,
|
||||
const wxString & helpURL):
|
||||
const wxString & helpURL,
|
||||
const bool Close):
|
||||
wxDialog(parent, (wxWindowID)-1, dlogTitle)
|
||||
{
|
||||
dhelpURL = helpURL;
|
||||
dClose = Close;
|
||||
|
||||
ShuttleGui S(this, eIsCreating);
|
||||
|
||||
@@ -116,7 +120,6 @@ ErrorDialog::ErrorDialog(
|
||||
|
||||
void ErrorDialog::OnOk(wxCommandEvent &event)
|
||||
{
|
||||
|
||||
EndModal(true);
|
||||
}
|
||||
|
||||
@@ -234,15 +237,17 @@ void ErrorDialog::OnHelp(wxCommandEvent &event)
|
||||
return;
|
||||
}
|
||||
OpenInDefaultBrowser( dhelpURL );
|
||||
EndModal(true);
|
||||
if(dClose)
|
||||
EndModal(true);
|
||||
}
|
||||
|
||||
void ShowErrorDialog(wxWindow *parent,
|
||||
const wxString &dlogTitle,
|
||||
const wxString &message,
|
||||
const wxString &helpURL)
|
||||
const wxString &helpURL,
|
||||
const bool Close)
|
||||
{
|
||||
ErrorDialog dlog(parent, dlogTitle, message, helpURL);
|
||||
ErrorDialog dlog(parent, dlogTitle, message, helpURL, Close);
|
||||
dlog.CentreOnParent();
|
||||
dlog.ShowModal();
|
||||
}
|
||||
|
@@ -20,7 +20,8 @@
|
||||
void ShowErrorDialog(wxWindow *parent,
|
||||
const wxString &dlogTitle,
|
||||
const wxString &message,
|
||||
const wxString &helpURL);
|
||||
const wxString &helpURL,
|
||||
bool Close = true);
|
||||
|
||||
/// Displays cutable information in a text ctrl, with an OK button.
|
||||
void ShowInfoDialog( wxWindow *parent,
|
||||
|
Reference in New Issue
Block a user