mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-15 07:01:18 +02:00
Use macro safenew for many allocations of wxWindow subclasses
This commit is contained in:
@@ -243,7 +243,7 @@ static wxString AskCopyOrEdit()
|
||||
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
|
||||
dialog.SetSizer(vbox);
|
||||
|
||||
wxStaticText *message = new wxStaticText(&dialog, -1, wxString::Format(_("\
|
||||
wxStaticText *message = safenew wxStaticText(&dialog, -1, wxString::Format(_("\
|
||||
When importing uncompressed audio files you can either copy them \
|
||||
into the project, or read them directly from their current location (without copying).\n\n\
|
||||
Your current preference is set to %s.\n\n\
|
||||
@@ -259,19 +259,19 @@ How do you want to import the current file(s)?"), oldCopyPref == wxT("copy") ? _
|
||||
|
||||
vbox->Add(message, 1, wxALL | wxEXPAND, 10);
|
||||
|
||||
wxStaticBox *box = new wxStaticBox(&dialog, -1, _("Choose an import method"));
|
||||
wxStaticBox *box = safenew wxStaticBox(&dialog, -1, _("Choose an import method"));
|
||||
box->SetName(box->GetLabel());
|
||||
wxStaticBoxSizer *boxsizer = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
wxRadioButton *copyRadio = new wxRadioButton(&dialog, -1, _("Make a © of the files before editing (safer)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
||||
wxRadioButton *copyRadio = safenew wxRadioButton(&dialog, -1, _("Make a © of the files before editing (safer)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
||||
boxsizer->Add(copyRadio, 0, wxALL);
|
||||
copyRadio->SetName(wxStripMenuCodes(copyRadio->GetLabel()));
|
||||
|
||||
wxRadioButton *aliasRadio = new wxRadioButton(&dialog, -1, _("Read the files &directly from the original (faster)"));
|
||||
wxRadioButton *aliasRadio = safenew wxRadioButton(&dialog, -1, _("Read the files &directly from the original (faster)"));
|
||||
boxsizer->Add(aliasRadio, 0, wxALL);
|
||||
aliasRadio->SetName(wxStripMenuCodes(aliasRadio->GetLabel()));
|
||||
|
||||
wxCheckBox *dontAskNextTimeBox = new wxCheckBox(&dialog, -1, _("Don't &warn again and always use my choice above"));
|
||||
wxCheckBox *dontAskNextTimeBox = safenew wxCheckBox(&dialog, -1, _("Don't &warn again and always use my choice above"));
|
||||
boxsizer->Add(dontAskNextTimeBox, 0, wxALL);
|
||||
vbox->Add(boxsizer, 0, wxALL, 10);
|
||||
dontAskNextTimeBox->SetName(wxStripMenuCodes(dontAskNextTimeBox->GetLabel()));
|
||||
|
Reference in New Issue
Block a user