mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-21 16:11:11 +01:00
More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent windows
This commit is contained in:
@@ -84,5 +84,6 @@ BatchPrefs::~BatchPrefs()
|
||||
|
||||
PrefsPanel *BatchPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new BatchPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew BatchPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -374,5 +374,6 @@ bool DevicePrefs::Apply()
|
||||
|
||||
PrefsPanel *DevicePrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new DevicePrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew DevicePrefs(parent);
|
||||
}
|
||||
|
||||
@@ -266,5 +266,6 @@ bool DirectoriesPrefs::Apply()
|
||||
|
||||
PrefsPanel *DirectoriesPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new DirectoriesPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew DirectoriesPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -170,5 +170,6 @@ bool EffectsPrefs::Apply()
|
||||
|
||||
PrefsPanel *EffectsPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new EffectsPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew EffectsPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -783,5 +783,6 @@ void ExtImportPrefsDropTarget::SetDataObject(wxDataObject* data)
|
||||
|
||||
PrefsPanel *ExtImportPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new ExtImportPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ExtImportPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -178,5 +178,6 @@ bool GUIPrefs::Apply()
|
||||
|
||||
PrefsPanel *GUIPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new GUIPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew GUIPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -112,5 +112,6 @@ bool ImportExportPrefs::Apply()
|
||||
|
||||
PrefsPanel *ImportExportPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new ImportExportPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ImportExportPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartHorizontalLay(wxEXPAND, 1);
|
||||
{
|
||||
if (!mView) {
|
||||
mView = new KeyView(this, CommandsListID);
|
||||
mView = safenew KeyView(this, CommandsListID);
|
||||
mView->SetName(_("Bindings"));
|
||||
}
|
||||
S.Prop(true);
|
||||
@@ -1209,5 +1209,6 @@ void KeyConfigPrefs::Cancel()
|
||||
|
||||
PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new KeyConfigPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew KeyConfigPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -241,5 +241,6 @@ bool LibraryPrefs::Apply()
|
||||
|
||||
PrefsPanel *LibraryPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new LibraryPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew LibraryPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -286,7 +286,8 @@ bool MidiIOPrefs::Validate()
|
||||
|
||||
PrefsPanel *MidiIOPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new MidiIOPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew MidiIOPrefs(parent);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -163,7 +163,6 @@ void ModulePrefs::SetModuleStatus( wxString fname, int iStatus ){
|
||||
|
||||
PrefsPanel *ModulePrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new ModulePrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ModulePrefs(parent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,5 +205,6 @@ bool MousePrefs::Apply()
|
||||
|
||||
PrefsPanel *MousePrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new MousePrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew MousePrefs(parent);
|
||||
}
|
||||
|
||||
@@ -125,5 +125,6 @@ bool PlaybackPrefs::Apply()
|
||||
|
||||
PrefsPanel *PlaybackPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new PlaybackPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew PlaybackPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ class PrefsPanel:public wxPanel
|
||||
class PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
// Precondition: parent != NULL
|
||||
virtual PrefsPanel *Create(wxWindow *parent) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -82,5 +82,6 @@ bool ProjectsPrefs::Apply()
|
||||
|
||||
PrefsPanel *ProjectsPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new ProjectsPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ProjectsPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -230,5 +230,6 @@ bool QualityPrefs::Apply()
|
||||
|
||||
PrefsPanel *QualityPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new QualityPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew QualityPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -252,5 +252,6 @@ void RecordingPrefs::OnToggleCustomName(wxCommandEvent & Evt)
|
||||
|
||||
PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new RecordingPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew RecordingPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -513,5 +513,6 @@ SpectrumPrefsFactory::SpectrumPrefsFactory(WaveTrack *wt)
|
||||
|
||||
PrefsPanel *SpectrumPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new SpectrumPrefs(parent, mWt);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew SpectrumPrefs(parent, mWt);
|
||||
}
|
||||
|
||||
@@ -208,5 +208,6 @@ bool ThemePrefs::Apply()
|
||||
|
||||
PrefsPanel *ThemePrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new ThemePrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ThemePrefs(parent);
|
||||
}
|
||||
|
||||
@@ -164,5 +164,6 @@ bool TracksPrefs::Apply()
|
||||
|
||||
PrefsPanel *TracksPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new TracksPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew TracksPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -86,5 +86,6 @@ bool WarningsPrefs::Apply()
|
||||
|
||||
PrefsPanel *WarningsPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new WarningsPrefs(parent);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew WarningsPrefs(parent);
|
||||
}
|
||||
|
||||
@@ -244,5 +244,6 @@ WaveformPrefsFactory::WaveformPrefsFactory(WaveTrack *wt)
|
||||
|
||||
PrefsPanel *WaveformPrefsFactory::Create(wxWindow *parent)
|
||||
{
|
||||
return new WaveformPrefs(parent, mWt);
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew WaveformPrefs(parent, mWt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user