mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-07 04:01:54 +01:00
bug 26 - add modeless warning dialog for missing aliased files during playback.
This commit is contained in:
@@ -44,11 +44,12 @@ class ErrorDialog : public wxDialog
|
||||
const wxString & dlogTitle,
|
||||
const wxString & message,
|
||||
const wxString & helpURL,
|
||||
const bool Close = true);
|
||||
const bool Close = true, const bool modal = true);
|
||||
|
||||
private:
|
||||
wxString dhelpURL;
|
||||
bool dClose;
|
||||
bool dModal;
|
||||
|
||||
void OnOk( wxCommandEvent &event );
|
||||
void OnHelp( wxCommandEvent &event );
|
||||
@@ -66,11 +67,12 @@ ErrorDialog::ErrorDialog(
|
||||
const wxString & dlogTitle,
|
||||
const wxString & message,
|
||||
const wxString & helpURL,
|
||||
const bool Close):
|
||||
const bool Close, const bool modal):
|
||||
wxDialog(parent, (wxWindowID)-1, dlogTitle)
|
||||
{
|
||||
dhelpURL = helpURL;
|
||||
dClose = Close;
|
||||
dModal = modal;
|
||||
|
||||
ShuttleGui S(this, eIsCreating);
|
||||
|
||||
@@ -119,8 +121,11 @@ ErrorDialog::ErrorDialog(
|
||||
}
|
||||
|
||||
void ErrorDialog::OnOk(wxCommandEvent &event)
|
||||
{
|
||||
EndModal(true);
|
||||
{
|
||||
if (dModal)
|
||||
EndModal(true);
|
||||
else
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// Helper class to make browser "simulate" a modal dialog
|
||||
@@ -252,6 +257,17 @@ void ShowErrorDialog(wxWindow *parent,
|
||||
dlog.ShowModal();
|
||||
}
|
||||
|
||||
void ShowModelessErrorDialog(wxWindow *parent,
|
||||
const wxString &dlogTitle,
|
||||
const wxString &message,
|
||||
const wxString &helpURL,
|
||||
const bool Close)
|
||||
{
|
||||
ErrorDialog *dlog = new ErrorDialog(parent, dlogTitle, message, helpURL, Close, false);
|
||||
dlog->CentreOnParent();
|
||||
dlog->Show();
|
||||
}
|
||||
|
||||
|
||||
/// Mostly we use this so that we have the code for resizability
|
||||
/// in one place. Other considerations like screen readers are also
|
||||
|
||||
Reference in New Issue
Block a user