"Error opening sound device" as Error dialog

ShowErrorDialog could do with some polish, but it supports linking
a help button to the manual.
This commit is contained in:
Steve Daulton 2017-05-20 17:11:02 +01:00
parent bba5a8fef1
commit d6a9011960
2 changed files with 17 additions and 10 deletions

View File

@ -54,6 +54,9 @@ greater use in future.
#include "TimeWarper.h"
#include "nyquist/Nyquist.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "../widgets/ErrorDialog.h"
#include "../FileNames.h"
#if defined(__WXMAC__)
#include <Cocoa/Cocoa.h>
@ -2615,8 +2618,9 @@ void Effect::Preview(bool dryOnly)
}
}
else {
wxMessageBox(_("Error opening sound device. Try changing the audio host, playback device and the project sample rate."),
_("Error"), wxOK | wxICON_EXCLAMATION, FocusDialog);
ShowErrorDialog(FocusDialog, _("Error"),
_("Error opening sound device.\nTry changing the audio host, playback device and the project sample rate."),
wxT("http://manual.audacityteam.org/man/faq_errors.html#sound_device"), false);
}
}
}

View File

@ -67,6 +67,9 @@
#include "../WaveTrack.h"
#include "../widgets/AButton.h"
#include "../widgets/Meter.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "../widgets/ErrorDialog.h"
#include "../FileNames.h"
#include "../tracks/ui/Scrubbing.h"
#include "../prefs/TracksPrefs.h"
@ -697,11 +700,10 @@ int ControlToolBar::PlayPlayRegion(const SelectedRegion &selectedRegion,
#endif
}
else {
// msmeyer: Show error message if stream could not be opened
wxMessageBox(
_("Error opening sound device. "
"Try changing the audio host, playback device and the project sample rate."),
_("Error"), wxOK | wxICON_EXCLAMATION, this);
// Show error message if stream could not be opened
ShowErrorDialog(this, _("Error"),
_("Error opening sound device.\nTry changing the audio host, playback device and the project sample rate."),
wxT("http://manual.audacityteam.org/man/faq_errors.html#sound_device"), false);
}
}
@ -1173,9 +1175,10 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
StartScrollingIfPreferred();
}
else {
// msmeyer: Show error message if stream could not be opened
wxMessageBox(_("Error opening sound device. Try changing the audio host, recording device and the project sample rate."),
_("Error"), wxOK | wxICON_EXCLAMATION, this);
// Show error message if stream could not be opened
ShowErrorDialog(this, _("Error"),
_("Error opening sound device.\nTry changing the audio host, recording device and the project sample rate."),
wxT("http://manual.audacityteam.org/man/faq_errors.html#sound_device"), false);
}
}
}