mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
Follow wxWidgets argument conventions for PrefsPanel factories
This commit is contained in:
parent
151cbb1305
commit
228388a63c
@ -32,8 +32,8 @@ BEGIN_EVENT_TABLE(BatchPrefs, PrefsPanel)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
/// Constructor
|
||||
BatchPrefs::BatchPrefs(wxWindow * parent):
|
||||
PrefsPanel(parent, _("Batch"))
|
||||
BatchPrefs::BatchPrefs(wxWindow * parent, wxWindowID winid):
|
||||
PrefsPanel(parent, winid, _("Batch"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -83,8 +83,8 @@ BatchPrefs::~BatchPrefs()
|
||||
{
|
||||
}
|
||||
|
||||
PrefsPanel *BatchPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *BatchPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew BatchPrefs(parent);
|
||||
return safenew BatchPrefs(parent, winid);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class ShuttleGui;
|
||||
class BatchPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
BatchPrefs(wxWindow * parent);
|
||||
BatchPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~BatchPrefs();
|
||||
bool Commit() override;
|
||||
|
||||
@ -37,6 +37,6 @@ private:
|
||||
class BatchPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -52,8 +52,8 @@ BEGIN_EVENT_TABLE(DevicePrefs, PrefsPanel)
|
||||
EVT_CHOICE(RecordID, DevicePrefs::OnDevice)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DevicePrefs::DevicePrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Devices"))
|
||||
DevicePrefs::DevicePrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Devices"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -414,8 +414,8 @@ wxString DevicePrefs::HelpPageName()
|
||||
return "Devices_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *DevicePrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *DevicePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew DevicePrefs(parent);
|
||||
return safenew DevicePrefs(parent, winid);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class ShuttleGui;
|
||||
class DevicePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
DevicePrefs(wxWindow * parent);
|
||||
DevicePrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~DevicePrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -58,7 +58,7 @@ class DevicePrefs final : public PrefsPanel
|
||||
class DevicePrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -48,9 +48,9 @@ BEGIN_EVENT_TABLE(DirectoriesPrefs, PrefsPanel)
|
||||
EVT_BUTTON(ChooseButtonID, DirectoriesPrefs::OnChooseTempDir)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DirectoriesPrefs::DirectoriesPrefs(wxWindow * parent)
|
||||
DirectoriesPrefs::DirectoriesPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: Directories, also called folders, in computer file systems */
|
||||
: PrefsPanel(parent, _("Directories")),
|
||||
: PrefsPanel(parent, winid, _("Directories")),
|
||||
mFreeSpace(NULL),
|
||||
mTempDir(NULL)
|
||||
{
|
||||
@ -273,8 +273,8 @@ wxString DirectoriesPrefs::HelpPageName()
|
||||
return "Directories_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *DirectoriesPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *DirectoriesPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew DirectoriesPrefs(parent);
|
||||
return safenew DirectoriesPrefs(parent, winid);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class ShuttleGui;
|
||||
class DirectoriesPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
DirectoriesPrefs(wxWindow * parent);
|
||||
DirectoriesPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~DirectoriesPrefs();
|
||||
bool Commit() override;
|
||||
bool Validate() override;
|
||||
@ -42,6 +42,6 @@ class DirectoriesPrefs final : public PrefsPanel
|
||||
class DirectoriesPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
EffectsPrefs::EffectsPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Effects"))
|
||||
EffectsPrefs::EffectsPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Effects"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -176,8 +176,8 @@ wxString EffectsPrefs::HelpPageName()
|
||||
return "Effects_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *EffectsPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew EffectsPrefs(parent);
|
||||
return safenew EffectsPrefs(parent, winid);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class ShuttleGui;
|
||||
class EffectsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
EffectsPrefs(wxWindow * parent);
|
||||
EffectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~EffectsPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -38,6 +38,6 @@ class EffectsPrefs final : public PrefsPanel
|
||||
class EffectsPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -56,10 +56,10 @@ BEGIN_EVENT_TABLE(ExtImportPrefs, PrefsPanel)
|
||||
EVT_BUTTON(EIPMoveFilterDown,ExtImportPrefs::OnFilterMoveDown)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
ExtImportPrefs::ExtImportPrefs(wxWindow * parent)
|
||||
ExtImportPrefs::ExtImportPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: Title of dialog governing "Extended", or "advanced,"
|
||||
* audio file import options */
|
||||
: PrefsPanel(parent, _("Extended Import")), RuleTable(NULL),
|
||||
: PrefsPanel(parent, winid, _("Extended Import")), RuleTable(NULL),
|
||||
PluginList(NULL), mCreateTable (false), mDragFocus (NULL),
|
||||
mFakeKeyEvent (false), mStopRecursiveSelection (false), last_selected (-1)
|
||||
{
|
||||
@ -811,8 +811,8 @@ void ExtImportPrefsDropTarget::OnLeave()
|
||||
{
|
||||
}
|
||||
|
||||
PrefsPanel *ExtImportPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *ExtImportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ExtImportPrefs(parent);
|
||||
return safenew ExtImportPrefs(parent, winid);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ private:
|
||||
class ExtImportPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ExtImportPrefs(wxWindow * parent);
|
||||
ExtImportPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ExtImportPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -111,6 +111,6 @@ class ExtImportPrefs final : public PrefsPanel
|
||||
class ExtImportPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -36,9 +36,9 @@
|
||||
#include "../AColor.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
GUIPrefs::GUIPrefs(wxWindow * parent)
|
||||
GUIPrefs::GUIPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: refers to Audacity's user interface settings */
|
||||
: PrefsPanel(parent, _("Interface"))
|
||||
: PrefsPanel(parent, winid, _("Interface"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -233,8 +233,8 @@ wxString GUIPrefs::HelpPageName()
|
||||
return "Interface_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *GUIPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *GUIPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew GUIPrefs(parent);
|
||||
return safenew GUIPrefs(parent, winid);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class ShuttleGui;
|
||||
class GUIPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
GUIPrefs(wxWindow * parent);
|
||||
GUIPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~GUIPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -52,6 +52,6 @@ class GUIPrefs final : public PrefsPanel
|
||||
class GUIPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "ImportExportPrefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
ImportExportPrefs::ImportExportPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Import / Export"))
|
||||
ImportExportPrefs::ImportExportPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Import / Export"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -118,8 +118,8 @@ wxString ImportExportPrefs::HelpPageName()
|
||||
return "Import_-_Export_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ImportExportPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *ImportExportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ImportExportPrefs(parent);
|
||||
return safenew ImportExportPrefs(parent, winid);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class ShuttleGui;
|
||||
class ImportExportPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ImportExportPrefs(wxWindow * parent);
|
||||
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ImportExportPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -37,6 +37,6 @@ class ImportExportPrefs final : public PrefsPanel
|
||||
class ImportExportPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -72,9 +72,10 @@ BEGIN_EVENT_TABLE(KeyConfigPrefs, PrefsPanel)
|
||||
EVT_TIMER(FilterTimerID, KeyConfigPrefs::OnFilterTimer)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent, const wxString &name)
|
||||
KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent, wxWindowID winid,
|
||||
const wxString &name)
|
||||
/* i18n-hint: as in computer keyboard (not musical!) */
|
||||
: PrefsPanel(parent, _("Keyboard")),
|
||||
: PrefsPanel(parent, winid, _("Keyboard")),
|
||||
mView(NULL),
|
||||
mKey(NULL),
|
||||
mFilter(NULL),
|
||||
@ -749,9 +750,9 @@ wxString KeyConfigPrefs::HelpPageName()
|
||||
return "Keyboard_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *KeyConfigPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
auto result = safenew KeyConfigPrefs{ parent, mName };
|
||||
auto result = safenew KeyConfigPrefs{ parent, winid, mName };
|
||||
return result;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class wxStaticText;
|
||||
class KeyConfigPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
KeyConfigPrefs(wxWindow * parent, const wxString &name);
|
||||
KeyConfigPrefs(wxWindow * parent, wxWindowID winid, const wxString &name);
|
||||
~KeyConfigPrefs();
|
||||
bool Commit() override;
|
||||
void Cancel() override;
|
||||
@ -99,8 +99,8 @@ class KeyConfigPrefsFactory final : public PrefsPanelFactory
|
||||
public:
|
||||
KeyConfigPrefsFactory(const wxString &name = wxString{})
|
||||
: mName{ name } {}
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
|
||||
private:
|
||||
wxString mName;
|
||||
};
|
||||
|
@ -46,9 +46,9 @@ BEGIN_EVENT_TABLE(LibraryPrefs, PrefsPanel)
|
||||
EVT_BUTTON(ID_FFMPEG_DOWN_BUTTON, LibraryPrefs::OnFFmpegDownButton)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
LibraryPrefs::LibraryPrefs(wxWindow * parent)
|
||||
LibraryPrefs::LibraryPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18-hint: refers to optional plug-in software libraries */
|
||||
: PrefsPanel(parent, _("Libraries"))
|
||||
: PrefsPanel(parent, winid, _("Libraries"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -250,8 +250,8 @@ wxString LibraryPrefs::HelpPageName()
|
||||
return "Libraries_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *LibraryPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *LibraryPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew LibraryPrefs(parent);
|
||||
return safenew LibraryPrefs(parent, winid);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class ShuttleGui;
|
||||
class LibraryPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
LibraryPrefs(wxWindow * parent);
|
||||
LibraryPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~LibraryPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -50,6 +50,6 @@ class LibraryPrefs final : public PrefsPanel
|
||||
class LibraryPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -55,9 +55,9 @@ BEGIN_EVENT_TABLE(MidiIOPrefs, PrefsPanel)
|
||||
// EVT_CHOICE(RecordID, MidiIOPrefs::OnDevice)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MidiIOPrefs::MidiIOPrefs(wxWindow * parent)
|
||||
MidiIOPrefs::MidiIOPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: untranslatable acronym for "Musical Instrument Device Interface" */
|
||||
: PrefsPanel(parent, _("MIDI Devices"))
|
||||
: PrefsPanel(parent, winid, _("MIDI Devices"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -296,10 +296,10 @@ wxString MidiIOPrefs::HelpPageName()
|
||||
return "MIDI_Devices_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *MidiIOPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *MidiIOPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew MidiIOPrefs(parent);
|
||||
return safenew MidiIOPrefs(parent, winid);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@ class ShuttleGui;
|
||||
class MidiIOPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
MidiIOPrefs(wxWindow * parent);
|
||||
MidiIOPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~MidiIOPrefs();
|
||||
bool Commit() override;
|
||||
bool Validate() override;
|
||||
@ -66,7 +66,7 @@ class MidiIOPrefs final : public PrefsPanel
|
||||
class MidiIOPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -29,8 +29,8 @@ with names like mnod-script-pipe that add NEW features.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* i18n-hint: Modules are optional extensions to Audacity that add NEW features.*/
|
||||
ModulePrefs::ModulePrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Modules"))
|
||||
ModulePrefs::ModulePrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Modules"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -168,8 +168,8 @@ wxString ModulePrefs::HelpPageName()
|
||||
return "Modules_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ModulePrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *ModulePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ModulePrefs(parent);
|
||||
return safenew ModulePrefs(parent, winid);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ enum {
|
||||
class ModulePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ModulePrefs(wxWindow * parent);
|
||||
ModulePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ModulePrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -54,6 +54,6 @@ class ModulePrefs final : public PrefsPanel
|
||||
class ModulePrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -61,8 +61,8 @@ enum
|
||||
#endif
|
||||
|
||||
/// Constructor
|
||||
MousePrefs::MousePrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Mouse"))
|
||||
MousePrefs::MousePrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Mouse"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -203,8 +203,8 @@ wxString MousePrefs::HelpPageName()
|
||||
return "Mouse_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *MousePrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *MousePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew MousePrefs(parent);
|
||||
return safenew MousePrefs(parent, winid);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class ShuttleGui;
|
||||
class MousePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
MousePrefs(wxWindow * parent);
|
||||
MousePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~MousePrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -42,6 +42,6 @@ class MousePrefs final : public PrefsPanel
|
||||
class MousePrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -28,8 +28,8 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
PlaybackPrefs::PlaybackPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Playback"))
|
||||
PlaybackPrefs::PlaybackPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Playback"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -132,9 +132,9 @@ wxString PlaybackPrefs::HelpPageName()
|
||||
return "Playback_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *PlaybackPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *PlaybackPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew PlaybackPrefs(parent);
|
||||
return safenew PlaybackPrefs(parent, winid);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class ShuttleGui;
|
||||
class PlaybackPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
PlaybackPrefs(wxWindow * parent);
|
||||
PlaybackPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~PlaybackPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -36,7 +36,7 @@ class PlaybackPrefs final : public PrefsPanel
|
||||
class PlaybackPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -261,7 +261,7 @@ PrefsDialog::PrefsDialog
|
||||
{
|
||||
const PrefsNode &node = *it;
|
||||
PrefsPanelFactory &factory = *node.pFactory;
|
||||
wxWindow *const w = factory.Create(mCategories);
|
||||
wxWindow *const w = factory(mCategories, wxID_ANY);
|
||||
if (stack.empty())
|
||||
// Parameters are: AddPage(page, name, IsSelected, imageId).
|
||||
mCategories->AddPage(w, w->GetName(), false, 0);
|
||||
@ -289,7 +289,7 @@ PrefsDialog::PrefsDialog
|
||||
// Unique page, don't show the factory
|
||||
const PrefsNode &node = factories[0];
|
||||
PrefsPanelFactory &factory = *node.pFactory;
|
||||
mUniquePage = factory.Create(this);
|
||||
mUniquePage = factory(this, wxID_ANY);
|
||||
wxWindow * uniquePageWindow = S.Prop(1).AddWindow(mUniquePage, wxEXPAND);
|
||||
// We're not in the wxTreebook, so add the accelerator here
|
||||
wxAcceleratorEntry entries[1];
|
||||
|
@ -43,8 +43,8 @@ ThemePrefs.
|
||||
class PrefsPanel /* not final */ : public wxPanelWrapper
|
||||
{
|
||||
public:
|
||||
PrefsPanel(wxWindow * parent, const wxString &title)
|
||||
: wxPanelWrapper(parent, wxID_ANY)
|
||||
PrefsPanel(wxWindow * parent, wxWindowID winid, const wxString &title)
|
||||
: wxPanelWrapper(parent, winid)
|
||||
{
|
||||
SetLabel(title); // Provide visual label
|
||||
SetName(title); // Provide audible label
|
||||
@ -71,7 +71,7 @@ class PrefsPanelFactory /* not final */
|
||||
{
|
||||
public:
|
||||
// Precondition: parent != NULL
|
||||
virtual PrefsPanel *Create(wxWindow *parent) = 0;
|
||||
virtual PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -29,8 +29,8 @@ handling.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ProjectsPrefs::ProjectsPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent,
|
||||
ProjectsPrefs::ProjectsPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid,
|
||||
/* i18n-hint: (noun) i.e Audacity projects. */
|
||||
_("Projects"))
|
||||
{
|
||||
@ -89,8 +89,8 @@ wxString ProjectsPrefs::HelpPageName()
|
||||
return "Projects_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ProjectsPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *ProjectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ProjectsPrefs(parent);
|
||||
return safenew ProjectsPrefs(parent, winid);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class ShuttleGui;
|
||||
class ProjectsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ProjectsPrefs(wxWindow * parent);
|
||||
ProjectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ProjectsPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -37,6 +37,6 @@ class ProjectsPrefs final : public PrefsPanel
|
||||
class ProjectsPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -34,9 +34,9 @@ BEGIN_EVENT_TABLE(QualityPrefs, PrefsPanel)
|
||||
EVT_CHOICE(ID_SAMPLE_RATE_CHOICE, QualityPrefs::OnSampleRateChoice)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
QualityPrefs::QualityPrefs(wxWindow * parent)
|
||||
QualityPrefs::QualityPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: meaning accuracy in reproduction of sounds */
|
||||
: PrefsPanel(parent, _("Quality"))
|
||||
: PrefsPanel(parent, winid, _("Quality"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -240,8 +240,8 @@ wxString QualityPrefs::HelpPageName()
|
||||
return "Quality_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *QualityPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *QualityPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew QualityPrefs(parent);
|
||||
return safenew QualityPrefs(parent, winid);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class ShuttleGui;
|
||||
class QualityPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
QualityPrefs(wxWindow * parent);
|
||||
QualityPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~QualityPrefs();
|
||||
|
||||
bool Commit() override;
|
||||
@ -57,6 +57,6 @@ class QualityPrefs final : public PrefsPanel
|
||||
class QualityPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -45,8 +45,8 @@ BEGIN_EVENT_TABLE(RecordingPrefs, PrefsPanel)
|
||||
EVT_CHECKBOX(UseCustomTrackNameID, RecordingPrefs::OnToggleCustomName)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
RecordingPrefs::RecordingPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Recording"))
|
||||
RecordingPrefs::RecordingPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Recording"))
|
||||
{
|
||||
gPrefs->Read(wxT("/GUI/TrackNames/RecordingNameCustom"), &mUseCustomTrackName, false);
|
||||
mOldNameChoice = mUseCustomTrackName;
|
||||
@ -268,8 +268,8 @@ wxString RecordingPrefs::HelpPageName()
|
||||
return "Recording_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *RecordingPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew RecordingPrefs(parent);
|
||||
return safenew RecordingPrefs(parent, winid);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class ShuttleGui;
|
||||
class RecordingPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
RecordingPrefs(wxWindow * parent);
|
||||
RecordingPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~RecordingPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -44,6 +44,6 @@ class RecordingPrefs final : public PrefsPanel
|
||||
class RecordingPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include "../Experimental.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
SpectrumPrefs::SpectrumPrefs(wxWindow * parent, WaveTrack *wt)
|
||||
: PrefsPanel(parent, wt ? _("Spectrogram Settings") : _("Spectrograms"))
|
||||
SpectrumPrefs::SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt)
|
||||
: PrefsPanel(parent, winid, wt ? _("Spectrogram Settings") : _("Spectrograms"))
|
||||
, mWt(wt)
|
||||
, mPopulating(false)
|
||||
{
|
||||
@ -585,8 +585,8 @@ SpectrumPrefsFactory::SpectrumPrefsFactory(WaveTrack *wt)
|
||||
{
|
||||
}
|
||||
|
||||
PrefsPanel *SpectrumPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *SpectrumPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew SpectrumPrefs(parent, mWt);
|
||||
return safenew SpectrumPrefs(parent, winid, mWt);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class WaveTrack;
|
||||
class SpectrumPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
SpectrumPrefs(wxWindow * parent, WaveTrack *wt);
|
||||
SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||
virtual ~SpectrumPrefs();
|
||||
void Preview() override;
|
||||
bool Commit() override;
|
||||
@ -108,7 +108,7 @@ class SpectrumPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
explicit SpectrumPrefsFactory(WaveTrack *wt = 0);
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
|
||||
private:
|
||||
WaveTrack *const mWt;
|
||||
|
@ -56,12 +56,12 @@ BEGIN_EVENT_TABLE(ThemePrefs, PrefsPanel)
|
||||
EVT_BUTTON(idSaveThemeAsCode, ThemePrefs::OnSaveThemeAsCode)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
ThemePrefs::ThemePrefs(wxWindow * parent)
|
||||
ThemePrefs::ThemePrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: A theme is a consistent visual style across an application's
|
||||
graphical user interface, including choices of colors, and similarity of images
|
||||
such as those on button controls. Audacity can load and save alternative
|
||||
themes. */
|
||||
: PrefsPanel(parent, _("Theme"))
|
||||
: PrefsPanel(parent, winid, _("Theme"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -201,8 +201,8 @@ bool ThemePrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
PrefsPanel *ThemePrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *ThemePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew ThemePrefs(parent);
|
||||
return safenew ThemePrefs(parent, winid);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class ShuttleGui;
|
||||
class ThemePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ThemePrefs(wxWindow * parent);
|
||||
ThemePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ThemePrefs(void);
|
||||
bool Commit() override;
|
||||
|
||||
@ -44,6 +44,6 @@ class ThemePrefs final : public PrefsPanel
|
||||
class ThemePrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
TracksBehaviorsPrefs::TracksBehaviorsPrefs(wxWindow * parent)
|
||||
TracksBehaviorsPrefs::TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: two nouns */
|
||||
: PrefsPanel(parent, _("Tracks Behaviors"))
|
||||
: PrefsPanel(parent, winid, _("Tracks Behaviors"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -125,8 +125,8 @@ TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
||||
{
|
||||
}
|
||||
|
||||
PrefsPanel *TracksBehaviorsPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *TracksBehaviorsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew TracksBehaviorsPrefs(parent);
|
||||
return safenew TracksBehaviorsPrefs(parent, winid);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class ShuttleGui;
|
||||
class TracksBehaviorsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
TracksBehaviorsPrefs(wxWindow * parent);
|
||||
TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~TracksBehaviorsPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -41,7 +41,7 @@ class TracksBehaviorsPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
explicit TracksBehaviorsPrefsFactory();
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -45,11 +45,11 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
TracksPrefs::TracksPrefs(wxWindow * parent)
|
||||
TracksPrefs::TracksPrefs(wxWindow * parent, wxWindowID winid)
|
||||
/* i18n-hint: "Tracks" include audio recordings but also other collections of
|
||||
* data associated with a time line, such as sequences of labels, and musical
|
||||
* notes */
|
||||
: PrefsPanel(parent, _("Tracks"))
|
||||
: PrefsPanel(parent, winid, _("Tracks"))
|
||||
{
|
||||
// Bugs 1043, 1044
|
||||
// First rewrite legacy preferences
|
||||
@ -239,8 +239,8 @@ wxString TracksPrefs::HelpPageName()
|
||||
return "Tracks_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *TracksPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *TracksPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew TracksPrefs(parent);
|
||||
return safenew TracksPrefs(parent, winid);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class ShuttleGui;
|
||||
class TracksPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
TracksPrefs(wxWindow * parent);
|
||||
TracksPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~TracksPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -52,6 +52,6 @@ class TracksPrefs final : public PrefsPanel
|
||||
class TracksPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WarningsPrefs::WarningsPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Warnings"))
|
||||
WarningsPrefs::WarningsPrefs(wxWindow * parent, wxWindowID winid)
|
||||
: PrefsPanel(parent, winid, _("Warnings"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -96,8 +96,8 @@ wxString WarningsPrefs::HelpPageName()
|
||||
return "Warnings_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *WarningsPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *WarningsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew WarningsPrefs(parent);
|
||||
return safenew WarningsPrefs(parent, winid);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class ShuttleGui;
|
||||
class WarningsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
WarningsPrefs(wxWindow * parent);
|
||||
WarningsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~WarningsPrefs();
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
@ -37,6 +37,6 @@ class WarningsPrefs final : public PrefsPanel
|
||||
class WarningsPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -26,9 +26,9 @@ Paul Licameli
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../WaveTrack.h"
|
||||
|
||||
WaveformPrefs::WaveformPrefs(wxWindow * parent, WaveTrack *wt)
|
||||
WaveformPrefs::WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt)
|
||||
/* i18n-hint: A waveform is a visual representation of vibration */
|
||||
: PrefsPanel(parent, _("Waveforms"))
|
||||
: PrefsPanel(parent, winid, _("Waveforms"))
|
||||
, mWt(wt)
|
||||
, mPopulating(false)
|
||||
{
|
||||
@ -250,8 +250,8 @@ WaveformPrefsFactory::WaveformPrefsFactory(WaveTrack *wt)
|
||||
{
|
||||
}
|
||||
|
||||
PrefsPanel *WaveformPrefsFactory::Create(wxWindow *parent)
|
||||
PrefsPanel *WaveformPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
return safenew WaveformPrefs(parent, mWt);
|
||||
return safenew WaveformPrefs(parent, winid, mWt);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class wxChoice;
|
||||
class WaveformPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
WaveformPrefs(wxWindow * parent, WaveTrack *wt);
|
||||
WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||
virtual ~WaveformPrefs();
|
||||
bool Commit() override;
|
||||
bool ShowsPreviewButton() override;
|
||||
@ -60,7 +60,7 @@ class WaveformPrefsFactory final : public PrefsPanelFactory
|
||||
{
|
||||
public:
|
||||
explicit WaveformPrefsFactory(WaveTrack *wt = 0);
|
||||
PrefsPanel *Create(wxWindow *parent) override;
|
||||
PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
|
||||
|
||||
private:
|
||||
WaveTrack *const mWt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user