mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-06 17:13:49 +01:00
Change the text of the checkmark for the dropout warning
This commit is contained in:
@@ -37,7 +37,8 @@ class WarningDialog final : public wxDialogWrapper
|
||||
public:
|
||||
// constructors and destructors
|
||||
WarningDialog(wxWindow *parent,
|
||||
wxString message,
|
||||
const wxString &message,
|
||||
const wxString &footer,
|
||||
bool showCancelButton);
|
||||
|
||||
private:
|
||||
@@ -52,7 +53,14 @@ BEGIN_EVENT_TABLE(WarningDialog, wxDialogWrapper)
|
||||
EVT_BUTTON(wxID_OK, WarningDialog::OnOK)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
WarningDialog::WarningDialog(wxWindow *parent, wxString message, bool showCancelButton)
|
||||
const wxString &DefaultWarningFooter()
|
||||
{
|
||||
return _("Don't show this warning again");
|
||||
}
|
||||
|
||||
WarningDialog::WarningDialog(wxWindow *parent, const wxString &message,
|
||||
const wxString &footer,
|
||||
bool showCancelButton)
|
||||
: wxDialogWrapper(parent, wxID_ANY, (wxString)_("Warning"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
(showCancelButton ? wxDEFAULT_DIALOG_STYLE : wxCAPTION | wxSYSTEM_MENU)) // Unlike wxDEFAULT_DIALOG_STYLE, no wxCLOSE_BOX.
|
||||
@@ -66,7 +74,7 @@ WarningDialog::WarningDialog(wxWindow *parent, wxString message, bool showCancel
|
||||
S.StartVerticalLay(false);
|
||||
{
|
||||
S.AddUnits(message);
|
||||
mCheckBox = S.AddCheckBox(_("Don't show this warning again"), wxT("false"));
|
||||
mCheckBox = S.AddCheckBox(footer, wxT("false"));
|
||||
}
|
||||
|
||||
S.SetBorder(0);
|
||||
@@ -84,14 +92,15 @@ void WarningDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
int ShowWarningDialog(wxWindow *parent,
|
||||
const wxString &internalDialogName,
|
||||
const wxString &message,
|
||||
bool showCancelButton)
|
||||
bool showCancelButton,
|
||||
const wxString &footer)
|
||||
{
|
||||
auto key = WarningDialogKey(internalDialogName);
|
||||
if (!gPrefs->Read(key, (long) true)) {
|
||||
return wxID_OK;
|
||||
}
|
||||
|
||||
WarningDialog dlog(parent, message, showCancelButton);
|
||||
WarningDialog dlog(parent, message, footer, showCancelButton);
|
||||
|
||||
int retCode = dlog.ShowModal();
|
||||
if (retCode == wxID_CANCEL)
|
||||
|
||||
Reference in New Issue
Block a user