Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to std::vectors of other string-like classes for wxString, IsEmpty => empty Clear => clear Alloc => reserve for wxArrayString, Count => size GetCount => size IsEmpty => empty Add => push_back Clear => clear Empty => clear Sort => std::sort (only with default comparator) SetCount => resize Last => back Item => operator [] Alloc => reserve
This commit is contained in:
parent
5daa67dfe6
commit
2db49dc1f0
|
@ -290,7 +290,7 @@ public:
|
|||
|
||||
wxArrayString parsed = wxCmdLineParser::ConvertStringToArgs(parms);
|
||||
|
||||
for (size_t i = 0, cnt = parsed.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = parsed.size(); i < cnt; i++)
|
||||
{
|
||||
wxString key = parsed[i].BeforeFirst(wxT('=')).Trim(false).Trim(true);
|
||||
wxString val = parsed[i].AfterFirst(wxT('=')).Trim(false).Trim(true);
|
||||
|
|
|
@ -282,7 +282,7 @@ void QuitAudacity(bool bForce)
|
|||
// BG: unless force is true
|
||||
|
||||
// BG: Are there any projects open?
|
||||
//- if (!gAudacityProjects.IsEmpty())
|
||||
//- if (!gAudacityProjects.empty())
|
||||
/*start+*/
|
||||
if (gAudacityProjects.empty())
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ public:
|
|||
{
|
||||
// Add the filename to the queue. It will be opened by
|
||||
// the OnTimer() event when it is safe to do so.
|
||||
ofqueue.Add(data);
|
||||
ofqueue.push_back(data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -696,13 +696,13 @@ IMPLEMENT_APP(AudacityApp)
|
|||
// in response of an open-document apple event
|
||||
void AudacityApp::MacOpenFile(const wxString &fileName)
|
||||
{
|
||||
ofqueue.Add(fileName);
|
||||
ofqueue.push_back(fileName);
|
||||
}
|
||||
|
||||
// in response of a print-document apple event
|
||||
void AudacityApp::MacPrintFile(const wxString &fileName)
|
||||
{
|
||||
ofqueue.Add(fileName);
|
||||
ofqueue.push_back(fileName);
|
||||
}
|
||||
|
||||
// in response of a open-application apple event
|
||||
|
@ -771,7 +771,7 @@ bool AudacityApp::MRUOpen(const wxString &fullPathStr) {
|
|||
|
||||
AudacityProject *proj = GetActiveProject();
|
||||
|
||||
if (!fullPathStr.IsEmpty())
|
||||
if (!fullPathStr.empty())
|
||||
{
|
||||
// verify that the file exists
|
||||
if (wxFile::Exists(fullPathStr))
|
||||
|
@ -847,15 +847,15 @@ void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event))
|
|||
// AppleEvent messages (via wxWidgets). So, open any that are
|
||||
// in the queue and clean the queue.
|
||||
if (gInited) {
|
||||
if (ofqueue.GetCount()) {
|
||||
if (ofqueue.size()) {
|
||||
// Load each file on the queue
|
||||
while (ofqueue.GetCount()) {
|
||||
while (ofqueue.size()) {
|
||||
wxString name;
|
||||
name.swap(ofqueue[0]);
|
||||
ofqueue.RemoveAt(0);
|
||||
|
||||
// Get the user's attention if no file name was specified
|
||||
if (name.IsEmpty()) {
|
||||
if (name.empty()) {
|
||||
// Get the users attention
|
||||
AudacityProject *project = GetActiveProject();
|
||||
if (project) {
|
||||
|
@ -1021,7 +1021,7 @@ wxString AudacityApp::InitLang( const wxString & lang )
|
|||
}
|
||||
mLocale = std::make_unique<wxLocale>(info->Language);
|
||||
|
||||
for(unsigned int i=0; i<audacityPathList.GetCount(); i++)
|
||||
for(unsigned int i=0; i<audacityPathList.size(); i++)
|
||||
mLocale->AddCatalogLookupPathPrefix(audacityPathList[i]);
|
||||
|
||||
// LL: Must add the wxWidgets catalog manually since the search
|
||||
|
@ -1703,7 +1703,7 @@ void AudacityApp::OnKeyDown(wxKeyEvent &event)
|
|||
// We now disallow temp directory name that puts it where cleaner apps will
|
||||
// try to clean out the files.
|
||||
bool AudacityApp::IsTempDirectoryNameOK( const wxString & Name ){
|
||||
if( Name.IsEmpty() )
|
||||
if( Name.empty() )
|
||||
return false;
|
||||
|
||||
wxFileName tmpFile;
|
||||
|
@ -1734,7 +1734,7 @@ bool AudacityApp::IsTempDirectoryNameOK( const wxString & Name ){
|
|||
// result is unchanged if unsuccessful.
|
||||
void SetToExtantDirectory( wxString & result, const wxString & dir ){
|
||||
// don't allow path of "".
|
||||
if( dir.IsEmpty() )
|
||||
if( dir.empty() )
|
||||
return;
|
||||
if( wxDirExists( dir ) ){
|
||||
result = dir;
|
||||
|
@ -1876,7 +1876,7 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||
{
|
||||
wxFileName filename(parser->GetParam(i));
|
||||
if (filename.MakeAbsolute())
|
||||
filenames.Add(filename.GetLongPath());
|
||||
filenames.push_back(filename.GetLongPath());
|
||||
}
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
|
@ -1894,9 +1894,9 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||
if (conn)
|
||||
{
|
||||
bool ok = false;
|
||||
if (filenames.GetCount() > 0)
|
||||
if (filenames.size() > 0)
|
||||
{
|
||||
for (size_t i = 0, cnt = filenames.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = filenames.size(); i < cnt; i++)
|
||||
{
|
||||
ok = conn->Execute(filenames[i]);
|
||||
}
|
||||
|
@ -1935,9 +1935,9 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||
sock->Connect(addr, true);
|
||||
if (sock->IsConnected())
|
||||
{
|
||||
if (filenames.GetCount() > 0)
|
||||
if (filenames.size() > 0)
|
||||
{
|
||||
for (size_t i = 0, cnt = filenames.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = filenames.size(); i < cnt; i++)
|
||||
{
|
||||
const wxString param = filenames[i];
|
||||
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
|
||||
|
@ -2028,7 +2028,7 @@ void AudacityApp::OnSocketEvent(wxSocketEvent & evt)
|
|||
{
|
||||
// Add the filename to the queue. It will be opened by
|
||||
// the OnTimer() event when it is safe to do so.
|
||||
ofqueue.Add(name);
|
||||
ofqueue.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2082,12 +2082,12 @@ void AudacityApp::AddUniquePathToPathList(const wxString &pathArg,
|
|||
pathNorm.Normalize();
|
||||
const wxString newpath{ pathNorm.GetFullPath() };
|
||||
|
||||
for(unsigned int i=0; i<pathList.GetCount(); i++) {
|
||||
for(unsigned int i=0; i<pathList.size(); i++) {
|
||||
if (wxFileName(newpath) == wxFileName(pathList[i]))
|
||||
return;
|
||||
}
|
||||
|
||||
pathList.Add(newpath);
|
||||
pathList.push_back(newpath);
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -2116,7 +2116,7 @@ void AudacityApp::FindFilesInPathList(const wxString & pattern,
|
|||
|
||||
wxFileName ff;
|
||||
|
||||
for(size_t i = 0; i < pathList.GetCount(); i++) {
|
||||
for(size_t i = 0; i < pathList.size(); i++) {
|
||||
ff = pathList[i] + wxFILE_SEP_PATH + pattern;
|
||||
wxDir::GetAllFiles(ff.GetPath(), &results, ff.GetFullName(), flags);
|
||||
}
|
||||
|
@ -2358,7 +2358,7 @@ void AudacityApp::AssociateFileTypes()
|
|||
root_key.Empty();
|
||||
}
|
||||
}
|
||||
if (root_key.IsEmpty()) {
|
||||
if (root_key.empty()) {
|
||||
//v Warn that we can't set keys. Ask whether to set pref for no retry?
|
||||
} else {
|
||||
associateFileTypes = wxT("Audacity.Project"); // Finally set value for .AUP key
|
||||
|
|
|
@ -97,7 +97,7 @@ void MessageBoxException::DelayedHandlerAction()
|
|||
if ( wxAtomicDec( sOutstandingMessages ) == 0 )
|
||||
::AudacityMessageBox(
|
||||
ErrorMessage(),
|
||||
caption.IsEmpty() ? AudacityMessageBoxCaptionStr() : caption,
|
||||
caption.empty() ? AudacityMessageBoxCaptionStr() : caption,
|
||||
wxICON_ERROR
|
||||
);
|
||||
moved = true;
|
||||
|
|
|
@ -71,7 +71,7 @@ void AudacityLogger::DoLogText(const wxString & str)
|
|||
wxMutexGuiEnter();
|
||||
}
|
||||
|
||||
if (mBuffer.IsEmpty()) {
|
||||
if (mBuffer.empty()) {
|
||||
wxString stamp;
|
||||
|
||||
TimeStamp(&stamp);
|
||||
|
|
|
@ -75,7 +75,7 @@ to the meters.
|
|||
\par Implementation Notes and Details for MIDI
|
||||
When opening devices, successAudio and successMidi indicate errors
|
||||
if false, so normally both are true. Use playbackChannels,
|
||||
captureChannels and mMidiPlaybackTracks.IsEmpty() to determine if
|
||||
captureChannels and mMidiPlaybackTracks.empty() to determine if
|
||||
Audio or MIDI is actually in use.
|
||||
|
||||
\par Audio Time
|
||||
|
@ -1043,7 +1043,7 @@ AudioIO::AudioIO()
|
|||
wxString errStr = _("Could not find any audio devices.\n");
|
||||
errStr += _("You will not be able to play or record audio.\n\n");
|
||||
wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
|
||||
if (!paErrStr.IsEmpty())
|
||||
if (!paErrStr.empty())
|
||||
errStr += _("Error: ")+paErrStr;
|
||||
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
||||
// long-term solution will probably involve exceptions
|
||||
|
@ -1225,7 +1225,7 @@ wxArrayString AudioIO::GetInputSourceNames()
|
|||
{
|
||||
int numSources = Px_GetNumInputSources(mPortMixer);
|
||||
for( int source = 0; source < numSources; source++ )
|
||||
deviceNames.Add(wxString(wxSafeConvertMB2WX(Px_GetInputSourceName(mPortMixer, source))));
|
||||
deviceNames.push_back(wxString(wxSafeConvertMB2WX(Px_GetInputSourceName(mPortMixer, source))));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3069,10 +3069,10 @@ std::vector<long> AudioIO::GetSupportedSampleRates(int playDevice, int recDevice
|
|||
result.push_back(playback[i]);
|
||||
|
||||
// If this yields no results, use the default sample rates nevertheless
|
||||
/* if (result.IsEmpty())
|
||||
/* if (result.empty())
|
||||
{
|
||||
for (i = 0; i < NumStandardRates; i++)
|
||||
result.Add(StandardRates[i]);
|
||||
result.push_back(StandardRates[i]);
|
||||
}*/
|
||||
|
||||
return result;
|
||||
|
@ -3286,7 +3286,7 @@ int AudioIO::getPlayDevIndex(const wxString &devNameArg)
|
|||
{
|
||||
wxString devName(devNameArg);
|
||||
// if we don't get given a device, look up the preferences
|
||||
if (devName.IsEmpty())
|
||||
if (devName.empty())
|
||||
{
|
||||
devName = gPrefs->Read(wxT("/AudioIO/PlaybackDevice"), wxT(""));
|
||||
}
|
||||
|
@ -3343,7 +3343,7 @@ int AudioIO::getRecordDevIndex(const wxString &devNameArg)
|
|||
{
|
||||
wxString devName(devNameArg);
|
||||
// if we don't get given a device, look up the preferences
|
||||
if (devName.IsEmpty())
|
||||
if (devName.empty())
|
||||
{
|
||||
devName = gPrefs->Read(wxT("/AudioIO/RecordingDevice"), wxT(""));
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ static bool RemoveAllAutoSaveFiles()
|
|||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.GetCount(); i++)
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
if (!wxRemoveFile(files[i]))
|
||||
{
|
||||
|
@ -209,7 +209,7 @@ static bool RecoverAllProjects(AudacityProject** pproj)
|
|||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.GetCount(); i++)
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
AudacityProject* proj{};
|
||||
if (*pproj)
|
||||
|
|
|
@ -174,7 +174,7 @@ void MacroCommandDialog::OnItemSelected(wxListEvent &event)
|
|||
|
||||
// If ID is empty, then the effect wasn't found, in which case, the user must have
|
||||
// selected one of the "special" commands.
|
||||
mEditParams->Enable(!ID.IsEmpty());
|
||||
mEditParams->Enable(!ID.empty());
|
||||
mUsePreset->Enable(em.HasPresets(ID));
|
||||
|
||||
if ( command.name.Translated() == mCommand->GetValue() )
|
||||
|
@ -185,7 +185,7 @@ void MacroCommandDialog::OnItemSelected(wxListEvent &event)
|
|||
mInternalCommandName = command.name.Internal();
|
||||
|
||||
wxString params = MacroCommands::GetCurrentParamsFor(mInternalCommandName);
|
||||
if (params.IsEmpty())
|
||||
if (params.empty())
|
||||
{
|
||||
params = em.GetDefaultPreset(ID);
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ void MacroCommandDialog::SetCommandAndParams(const wxString &Command, const wxSt
|
|||
|
||||
// If ID is empty, then the effect wasn't found, in which case, the user must have
|
||||
// selected one of the "special" commands.
|
||||
mEditParams->Enable(!ID.IsEmpty());
|
||||
mEditParams->Enable(!ID.empty());
|
||||
mUsePreset->Enable(em.HasPresets(ID));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ MacroCommands::MacroCommands()
|
|||
wxArrayString names = GetNames();
|
||||
wxArrayString defaults = GetNamesOfDefaultMacros();
|
||||
|
||||
for( size_t i = 0;i<defaults.Count();i++){
|
||||
for( size_t i = 0;i<defaults.size();i++){
|
||||
wxString name = defaults[i];
|
||||
if (names.Index(name) == wxNOT_FOUND) {
|
||||
AddMacro(name);
|
||||
|
@ -143,7 +143,7 @@ void MacroCommands::RestoreMacro(const wxString & name)
|
|||
|
||||
wxString MacroCommands::GetCommand(int index)
|
||||
{
|
||||
if (index < 0 || index >= (int)mCommandMacro.GetCount()) {
|
||||
if (index < 0 || index >= (int)mCommandMacro.size()) {
|
||||
return wxT("");
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ wxString MacroCommands::GetCommand(int index)
|
|||
|
||||
wxString MacroCommands::GetParams(int index)
|
||||
{
|
||||
if (index < 0 || index >= (int)mParamsMacro.GetCount()) {
|
||||
if (index < 0 || index >= (int)mParamsMacro.size()) {
|
||||
return wxT("");
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ wxString MacroCommands::GetParams(int index)
|
|||
|
||||
int MacroCommands::GetCount()
|
||||
{
|
||||
return (int)mCommandMacro.GetCount();
|
||||
return (int)mCommandMacro.size();
|
||||
}
|
||||
|
||||
bool MacroCommands::ReadMacro(const wxString & macro)
|
||||
|
@ -198,8 +198,8 @@ bool MacroCommands::ReadMacro(const wxString & macro)
|
|||
wxString parm = tf[i].Mid(splitAt + 1).Strip(wxString::trailing);
|
||||
|
||||
// Add to lists
|
||||
mCommandMacro.Add(cmd);
|
||||
mParamsMacro.Add(parm);
|
||||
mCommandMacro.push_back(cmd);
|
||||
mParamsMacro.push_back(parm);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ bool MacroCommands::WriteMacro(const wxString & macro)
|
|||
tf.Clear();
|
||||
|
||||
// Copy over the commands
|
||||
int lines = mCommandMacro.GetCount();
|
||||
int lines = mCommandMacro.size();
|
||||
for (int i = 0; i < lines; i++) {
|
||||
tf.AddLine(mCommandMacro[i] + wxT(":") + mParamsMacro[ i ]);
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
|
|||
while (plug)
|
||||
{
|
||||
auto command = em.GetCommandIdentifier(plug->GetID());
|
||||
if (!command.IsEmpty())
|
||||
if (!command.empty())
|
||||
commands.push_back( {
|
||||
{ command, plug->GetSymbol().Translation() },
|
||||
plug->GetPluginType() == PluginTypeEffect ?
|
||||
|
@ -323,14 +323,14 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
|
|||
wxArrayString mLabels;
|
||||
wxArrayString mNames;
|
||||
std::vector<bool> vHasDialog;
|
||||
mLabels.Clear();
|
||||
mNames.Clear();
|
||||
mLabels.clear();
|
||||
mNames.clear();
|
||||
mManager->GetAllCommandLabels(mLabels, vHasDialog, true);
|
||||
mManager->GetAllCommandNames(mNames, true);
|
||||
|
||||
const bool english = wxGetLocale()->GetCanonicalName().StartsWith(wxT("en"));
|
||||
|
||||
for(size_t i=0; i<mNames.GetCount(); i++) {
|
||||
for(size_t i=0; i<mNames.size(); i++) {
|
||||
wxString label = mLabels[i];
|
||||
if( !vHasDialog[i] ){
|
||||
label.Replace( "&", "" );
|
||||
|
@ -459,7 +459,7 @@ wxString MacroCommands::PromptForPresetFor(const wxString & command, const wxStr
|
|||
|
||||
// Preset will be empty if the user cancelled the dialog, so return the original
|
||||
// parameter value.
|
||||
if (preset.IsEmpty())
|
||||
if (preset.empty())
|
||||
{
|
||||
return params;
|
||||
}
|
||||
|
@ -630,7 +630,7 @@ bool MacroCommands::ApplySpecialCommand(
|
|||
extension = wxT(".flac");
|
||||
else extension = wxT(".mp3");
|
||||
|
||||
if (mFileName.IsEmpty()) {
|
||||
if (mFileName.empty()) {
|
||||
filename = BuildCleanFileName(project->GetFileName(), extension);
|
||||
}
|
||||
else {
|
||||
|
@ -642,7 +642,7 @@ bool MacroCommands::ApplySpecialCommand(
|
|||
// FIXME: TRAP_ERR No error reporting on write file failure in batch mode.
|
||||
if (command == wxT("NoAction")) {
|
||||
return true;
|
||||
} else if (!mFileName.IsEmpty() && command == wxT("Import")) {
|
||||
} else if (!mFileName.empty() && command == wxT("Import")) {
|
||||
// historically this was in use, now ignored if there
|
||||
return true;
|
||||
} else if (command == wxT("ExportMP3_56k_before")) {
|
||||
|
@ -868,7 +868,7 @@ bool MacroCommands::ApplyMacro(
|
|||
// Macro was successfully applied; save the NEW project state
|
||||
wxString longDesc, shortDesc;
|
||||
wxString name = gPrefs->Read(wxT("/Batch/ActiveMacro"), wxEmptyString);
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
/* i18n-hint: active verb in past tense */
|
||||
longDesc = _("Applied Macro");
|
||||
|
@ -902,7 +902,7 @@ void MacroCommands::AddToMacro(const wxString &command, int before)
|
|||
void MacroCommands::AddToMacro(const wxString &command, const wxString ¶ms, int before)
|
||||
{
|
||||
if (before == -1) {
|
||||
before = (int)mCommandMacro.GetCount();
|
||||
before = (int)mCommandMacro.size();
|
||||
}
|
||||
|
||||
mCommandMacro.Insert(command, before);
|
||||
|
@ -911,7 +911,7 @@ void MacroCommands::AddToMacro(const wxString &command, const wxString ¶ms,
|
|||
|
||||
void MacroCommands::DeleteFromMacro(int index)
|
||||
{
|
||||
if (index < 0 || index >= (int)mCommandMacro.GetCount()) {
|
||||
if (index < 0 || index >= (int)mCommandMacro.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -921,8 +921,8 @@ void MacroCommands::DeleteFromMacro(int index)
|
|||
|
||||
void MacroCommands::ResetMacro()
|
||||
{
|
||||
mCommandMacro.Clear();
|
||||
mParamsMacro.Clear();
|
||||
mCommandMacro.clear();
|
||||
mParamsMacro.clear();
|
||||
}
|
||||
|
||||
// ReportAndSkip() is a diagnostic function that avoids actually
|
||||
|
@ -992,9 +992,9 @@ wxArrayString MacroCommands::GetNames()
|
|||
size_t i;
|
||||
|
||||
wxFileName ff;
|
||||
for (i = 0; i < files.GetCount(); i++) {
|
||||
for (i = 0; i < files.size(); i++) {
|
||||
ff = (files[i]);
|
||||
names.Add(ff.GetName());
|
||||
names.push_back(ff.GetName());
|
||||
}
|
||||
|
||||
std::sort( names.begin(), names.end() );
|
||||
|
@ -1017,7 +1017,7 @@ void MacroCommands::Split(const wxString & str, wxString & command, wxString & p
|
|||
command.Empty();
|
||||
param.Empty();
|
||||
|
||||
if (str.IsEmpty()) {
|
||||
if (str.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ void ApplyMacroDialog::PopulateMacros()
|
|||
|
||||
int topItem = mMacros->GetTopItem();
|
||||
mMacros->DeleteAllItems();
|
||||
for (i = 0; i < (int)names.GetCount(); i++) {
|
||||
for (i = 0; i < (int)names.size(); i++) {
|
||||
mMacros->InsertItem(i, names[i]);
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ void ApplyMacroDialog::ApplyMacroToProject( const wxString & MacroID, bool bHasG
|
|||
void ApplyMacroDialog::ApplyMacroToProject( int iMacro, bool bHasGui )
|
||||
{
|
||||
wxString name = mMacros->GetItemText(iMacro);
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
return;
|
||||
|
||||
#ifdef OPTIONAL_ACTIVITY_WINDOW
|
||||
|
@ -420,7 +420,7 @@ void ApplyMacroDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
|||
S.EndVerticalLay();
|
||||
|
||||
int i;
|
||||
for (i = 0; i < (int)files.GetCount(); i++ ) {
|
||||
for (i = 0; i < (int)files.size(); i++ ) {
|
||||
fileList->InsertItem(i, files[i], i == 0);
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,7 @@ void ApplyMacroDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
|||
Hide();
|
||||
|
||||
mMacroCommands.ReadMacro(name);
|
||||
for (i = 0; i < (int)files.GetCount(); i++) {
|
||||
for (i = 0; i < (int)files.size(); i++) {
|
||||
wxWindowDisabler wd(&activityWin);
|
||||
if (i > 0) {
|
||||
//Clear the arrow in previous item.
|
||||
|
|
|
@ -491,7 +491,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
#if 0
|
||||
Printf(_("Checking file pointer leaks:\n"));
|
||||
Printf(_("Track # blocks: %d\n"), t->GetBlockArray()->Count());
|
||||
Printf(_("Track # blocks: %d\n"), t->GetBlockArray()->size());
|
||||
Printf(_("Disk # blocks: \n"));
|
||||
system("ls .audacity_temp/* | wc --lines");
|
||||
#endif
|
||||
|
|
|
@ -177,13 +177,13 @@ static int RecursivelyEnumerate(wxString dirPath,
|
|||
|
||||
// Don't DELETE files from a selective top level, e.g. if handed "projects*" as the
|
||||
// directory specifier.
|
||||
if (bFiles && dirspec.IsEmpty() ){
|
||||
if (bFiles && dirspec.empty() ){
|
||||
cont= dir.GetFirst(&name, filespec, wxDIR_FILES | wxDIR_HIDDEN | wxDIR_NO_FOLLOW);
|
||||
while ( cont ){
|
||||
wxString filepath = dirPath + wxFILE_SEP_PATH + name;
|
||||
|
||||
count++;
|
||||
filePathArray.Add(filepath);
|
||||
filePathArray.push_back(filepath);
|
||||
|
||||
cont = dir.GetNext(&name);
|
||||
|
||||
|
@ -206,7 +206,7 @@ static int RecursivelyEnumerate(wxString dirPath,
|
|||
}
|
||||
|
||||
if (bDirs) {
|
||||
filePathArray.Add(dirPath);
|
||||
filePathArray.push_back(dirPath);
|
||||
count++;
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ DirManager::~DirManager()
|
|||
if (numDirManagers == 0) {
|
||||
CleanTempDir();
|
||||
//::wxRmdir(temp);
|
||||
} else if( projFull.IsEmpty() && !mytemp.IsEmpty()) {
|
||||
} else if( projFull.empty() && !mytemp.empty()) {
|
||||
CleanDir(mytemp, wxEmptyString, ".DS_Store", _("Cleaning project temporary files"), kCleanTopDirToo | kCleanDirsOnlyIfEmpty );
|
||||
}
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ wxLongLong DirManager::GetFreeDiskSpace()
|
|||
wxLongLong freeSpace = -1;
|
||||
wxFileName path;
|
||||
|
||||
path.SetPath(projPath.IsEmpty() ? mytemp : projPath);
|
||||
path.SetPath(projPath.empty() ? mytemp : projPath);
|
||||
|
||||
// Use the parent directory if the project directory hasn't yet been created
|
||||
if (!path.DirExists())
|
||||
|
@ -1208,7 +1208,7 @@ BlockFilePtr DirManager::NewAliasBlockFile(
|
|||
aliasStart, aliasLen, aliasChannel);
|
||||
|
||||
mBlockFileHash[fileName]=newBlockFile;
|
||||
aliasList.Add(aliasedFile);
|
||||
aliasList.push_back(aliasedFile);
|
||||
|
||||
return newBlockFile;
|
||||
}
|
||||
|
@ -1225,7 +1225,7 @@ BlockFilePtr DirManager::NewODAliasBlockFile(
|
|||
aliasStart, aliasLen, aliasChannel);
|
||||
|
||||
mBlockFileHash[fileName]=newBlockFile;
|
||||
aliasList.Add(aliasedFile);
|
||||
aliasList.push_back(aliasedFile);
|
||||
|
||||
return newBlockFile;
|
||||
}
|
||||
|
@ -1242,7 +1242,7 @@ BlockFilePtr DirManager::NewODDecodeBlockFile(
|
|||
aliasStart, aliasLen, aliasChannel, decodeType);
|
||||
|
||||
mBlockFileHash[fileName]=newBlockFile;
|
||||
aliasList.Add(aliasedFile); //OD TODO: check to see if we need to remove this when done decoding.
|
||||
aliasList.push_back(aliasedFile); //OD TODO: check to see if we need to remove this when done decoding.
|
||||
//I don't immediately see a place where aliased files remove when a file is closed.
|
||||
|
||||
return newBlockFile;
|
||||
|
@ -1324,7 +1324,7 @@ BlockFilePtr DirManager::CopyBlockFile(const BlockFilePtr &b)
|
|||
b2 = b->Copy(std::move(newFile));
|
||||
|
||||
mBlockFileHash[newName] = b2;
|
||||
aliasList.Add(newPath);
|
||||
aliasList.push_back(newPath);
|
||||
}
|
||||
|
||||
if (!b2)
|
||||
|
@ -1445,7 +1445,7 @@ std::pair<bool, wxString> DirManager::LinkOrCopyToNewProjectDirectory(
|
|||
// Check that this BlockFile corresponds to a file on disk
|
||||
//ANSWER-ME: Is this checking only for SilentBlockFiles, in which case
|
||||
// (!oldFileName.IsOk()) is a more correct check?
|
||||
if (oldFileNameRef.GetName().IsEmpty()) {
|
||||
if (oldFileNameRef.GetName().empty()) {
|
||||
return { true, newPath };
|
||||
}
|
||||
|
||||
|
@ -1643,7 +1643,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
|
|||
}
|
||||
|
||||
aliasList.Remove(fullPath);
|
||||
aliasList.Add(renamedFullPath);
|
||||
aliasList.push_back(renamedFullPath);
|
||||
}
|
||||
|
||||
// Success!!! Either we successfully renamed the file,
|
||||
|
@ -1938,7 +1938,7 @@ _("Project check of \"%s\" folder \
|
|||
wxArrayString orphanFilePathArray; // orphan .au and .auf files
|
||||
this->FindOrphanBlockFiles(filePathArray, orphanFilePathArray);
|
||||
|
||||
if ((nResult != FSCKstatus_CLOSE_REQ) && !orphanFilePathArray.IsEmpty())
|
||||
if ((nResult != FSCKstatus_CLOSE_REQ) && !orphanFilePathArray.empty())
|
||||
{
|
||||
// In auto-recover mode, leave orphan blockfiles alone.
|
||||
// They will be deleted when project is saved the first time.
|
||||
|
@ -1956,7 +1956,7 @@ _("Project check of \"%s\" folder \
|
|||
other projects. \
|
||||
\nThey are doing no harm and are small.");
|
||||
wxString msg;
|
||||
msg.Printf(msgA, this->projName, (int)orphanFilePathArray.GetCount());
|
||||
msg.Printf(msgA, this->projName, (int)orphanFilePathArray.size());
|
||||
|
||||
const wxChar *buttons[] =
|
||||
{_("Continue without deleting; ignore the extra files this session"),
|
||||
|
@ -1977,7 +1977,7 @@ other projects. \
|
|||
// Plus they affect none of the valid tracks, so incorrect to mark them changed,
|
||||
// and no need for refresh.
|
||||
// nResult |= FSCKstatus_CHANGED;
|
||||
for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
|
||||
for (size_t i = 0; i < orphanFilePathArray.size(); i++)
|
||||
wxRemoveFile(orphanFilePathArray[i]);
|
||||
}
|
||||
}
|
||||
|
@ -1998,7 +1998,7 @@ other projects. \
|
|||
!missingAliasedFileAUFHash.empty() ||
|
||||
!missingAUFHash.empty() ||
|
||||
!missingAUHash.empty() ||
|
||||
!orphanFilePathArray.IsEmpty())
|
||||
!orphanFilePathArray.empty())
|
||||
{
|
||||
wxLogWarning(_("Project check found file inconsistencies inspecting the loaded project data."));
|
||||
wxLog::FlushActive(); // Flush is modal and will clear the log (both desired).
|
||||
|
@ -2116,7 +2116,7 @@ void DirManager::FindOrphanBlockFiles(
|
|||
{
|
||||
DirManager *clipboardDM = NULL;
|
||||
|
||||
for (size_t i = 0; i < filePathArray.GetCount(); i++)
|
||||
for (size_t i = 0; i < filePathArray.size(); i++)
|
||||
{
|
||||
const wxFileName &fullname = filePathArray[i];
|
||||
wxString basename = fullname.GetName();
|
||||
|
@ -2139,10 +2139,10 @@ void DirManager::FindOrphanBlockFiles(
|
|||
|
||||
// Ignore it if it exists in the clipboard (from a previously closed project)
|
||||
if (!(clipboardDM && clipboardDM->ContainsBlockFile(basename)))
|
||||
orphanFilePathArray.Add(fullname.GetFullPath());
|
||||
orphanFilePathArray.push_back(fullname.GetFullPath());
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
|
||||
for (size_t i = 0; i < orphanFilePathArray.size(); i++)
|
||||
wxLogWarning(_("Orphan block file: '%s'"), orphanFilePathArray[i]);
|
||||
}
|
||||
|
||||
|
@ -2166,7 +2166,7 @@ void DirManager::RemoveOrphanBlockfiles()
|
|||
orphanFilePathArray); // output: orphan files
|
||||
|
||||
// Remove all orphan blockfiles.
|
||||
for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
|
||||
for (size_t i = 0; i < orphanFilePathArray.size(); i++)
|
||||
wxRemoveFile(orphanFilePathArray[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ public:
|
|||
S.StartMultiColumn(2, wxEXPAND);
|
||||
S.SetStretchyCol(0);
|
||||
{
|
||||
if (mLibPath.GetFullPath().IsEmpty()) {
|
||||
if (mLibPath.GetFullPath().empty()) {
|
||||
text.Printf(_("To find '%s', click here -->"), mName);
|
||||
mPathText = S.AddTextBox( {}, text, 0);
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ public:
|
|||
mType,
|
||||
wxFD_OPEN | wxRESIZE_BORDER,
|
||||
this);
|
||||
if (!path.IsEmpty()) {
|
||||
if (!path.empty()) {
|
||||
mLibPath = path;
|
||||
mPathText->SetValue(path);
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ bool FFmpegLibs::FindLibs(wxWindow *parent)
|
|||
// configured name is not found.
|
||||
name = GetLibAVFormatName();
|
||||
wxLogMessage(wxT("Looking for FFmpeg libraries..."));
|
||||
if (!mLibAVFormatPath.IsEmpty()) {
|
||||
if (!mLibAVFormatPath.empty()) {
|
||||
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty."), mLibAVFormatPath);
|
||||
const wxFileName fn{ mLibAVFormatPath };
|
||||
path = fn.GetPath();
|
||||
|
@ -645,13 +645,13 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
|
|||
}
|
||||
|
||||
// First try loading it from a previously located path
|
||||
if (!mLibAVFormatPath.IsEmpty()) {
|
||||
if (!mLibAVFormatPath.empty()) {
|
||||
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty. Loading from it."),mLibAVFormatPath);
|
||||
mLibsLoaded = InitLibs(mLibAVFormatPath,showerr);
|
||||
}
|
||||
|
||||
// If not successful, try loading it from default path
|
||||
if (!mLibsLoaded && !GetLibAVFormatPath().IsEmpty()) {
|
||||
if (!mLibsLoaded && !GetLibAVFormatPath().empty()) {
|
||||
const wxFileName fn{ GetLibAVFormatPath(), GetLibAVFormatName() };
|
||||
wxString path = fn.GetFullPath();
|
||||
wxLogMessage(wxT("Trying to load FFmpeg libraries from default path, '%s'."), path);
|
||||
|
@ -663,7 +663,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
|
|||
|
||||
#if defined(__WXMAC__)
|
||||
// If not successful, try loading it from legacy path
|
||||
if (!mLibsLoaded && !GetLibAVFormatPath().IsEmpty()) {
|
||||
if (!mLibsLoaded && !GetLibAVFormatPath().empty()) {
|
||||
const wxFileName fn{wxT("/usr/local/lib/audacity"), GetLibAVFormatName()};
|
||||
wxString path = fn.GetFullPath();
|
||||
wxLogMessage(wxT("Trying to load FFmpeg libraries from legacy path, '%s'."), path);
|
||||
|
|
|
@ -220,7 +220,7 @@ wxArrayString sf_get_all_extensions()
|
|||
sf_command(NULL, SFC_GET_FORMAT_MAJOR,
|
||||
&format_info, sizeof (format_info)) ;
|
||||
|
||||
exts.Add(LAT1CTOWX(format_info.extension));
|
||||
exts.push_back(LAT1CTOWX(format_info.extension));
|
||||
}
|
||||
|
||||
// Some other extensions that are often sound files
|
||||
|
|
|
@ -116,7 +116,7 @@ void FileNames::MakeNameUnique(wxArrayString &otherNames, wxFileName &newName)
|
|||
i++;
|
||||
} while (otherNames.Index(newName.GetFullName(), false) >= 0);
|
||||
}
|
||||
otherNames.Add(newName.GetFullName());
|
||||
otherNames.push_back(newName.GetFullName());
|
||||
}
|
||||
|
||||
|
||||
|
@ -150,7 +150,7 @@ wxString FileNames::DataDir()
|
|||
// between wxStandardPaths and wxConfig under Linux. The latter
|
||||
// creates a normal file as "$HOME/.audacity", while the former
|
||||
// expects the ".audacity" portion to be a directory.
|
||||
if (gDataDir.IsEmpty())
|
||||
if (gDataDir.empty())
|
||||
{
|
||||
// If there is a directory "Portable Settings" relative to the
|
||||
// executable's EXE file, the prefs are stored in there, otherwise
|
||||
|
|
|
@ -239,7 +239,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
|
|||
/* i18n-hint: This refers to a "window function",
|
||||
* such as Hann or Rectangular, used in the
|
||||
* Frequency analyze dialog box. */
|
||||
funcChoices.Add(wxString::Format("%s window", WindowFuncName(i) ) );
|
||||
funcChoices.push_back(wxString::Format("%s window", WindowFuncName(i) ) );
|
||||
}
|
||||
|
||||
wxArrayString axisChoices;
|
||||
|
|
|
@ -307,7 +307,7 @@ wxString HelpText( const wxString & Key )
|
|||
wxString Text;
|
||||
Text = HelpTextBuiltIn( Key );
|
||||
|
||||
if( !Text.IsEmpty())
|
||||
if( !Text.empty())
|
||||
return LinkExpand( Text );
|
||||
|
||||
// Perhaps useful for debugging - we'll return key that we didn't find.
|
||||
|
|
|
@ -103,14 +103,14 @@ void Internat::Init()
|
|||
auto forbid = wxFileName::GetForbiddenChars(format);
|
||||
|
||||
for(auto cc: forbid)
|
||||
exclude.Add(wxString{ cc });
|
||||
exclude.push_back(wxString{ cc });
|
||||
|
||||
// The path separators may not be forbidden, so add them
|
||||
auto separators = wxFileName::GetPathSeparators(format);
|
||||
|
||||
for(auto cc: separators) {
|
||||
if (forbid.Find(cc) == wxNOT_FOUND)
|
||||
exclude.Add(wxString{ cc });
|
||||
exclude.push_back(wxString{ cc });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ bool Internat::SanitiseFilename(wxString &name, const wxString &sub)
|
|||
wxString Internat::StripAccelerators(const wxString &s)
|
||||
{
|
||||
wxString result;
|
||||
result.Alloc(s.Length());
|
||||
result.reserve(s.Length());
|
||||
for(size_t i = 0; i < s.Length(); i++) {
|
||||
if (s[i] == '\t')
|
||||
break;
|
||||
|
|
|
@ -155,7 +155,7 @@ void LabelDialog::PopulateLabels()
|
|||
wxGridCellAttr *attr;
|
||||
mGrid->SetColAttr(Col_Track, (attr = safenew wxGridCellAttr));
|
||||
attr->SetEditor(mChoiceEditor);
|
||||
mTrackNames.Add(_("New..."));
|
||||
mTrackNames.push_back(_("New..."));
|
||||
|
||||
// Initialize and set the time column attributes
|
||||
mGrid->SetColAttr(Col_Stime, (attr = safenew wxGridCellAttr));
|
||||
|
@ -384,7 +384,7 @@ bool LabelDialog::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
// Create any added tracks
|
||||
while (tndx < (int)mTrackNames.GetCount() - 1) {
|
||||
while (tndx < (int)mTrackNames.size() - 1) {
|
||||
|
||||
// Extract the name
|
||||
wxString name = mTrackNames[tndx + 1].AfterFirst(wxT('-')).Mid(1);
|
||||
|
@ -434,9 +434,9 @@ bool LabelDialog::Validate()
|
|||
wxString LabelDialog::TrackName(int & index, const wxString &dflt)
|
||||
{
|
||||
// Generate a NEW track name if the passed index is out of range
|
||||
if (index < 1 || index >= (int)mTrackNames.GetCount()) {
|
||||
index = mTrackNames.GetCount();
|
||||
mTrackNames.Add(wxString::Format(wxT("%d - %s"), index, dflt));
|
||||
if (index < 1 || index >= (int)mTrackNames.size()) {
|
||||
index = mTrackNames.size();
|
||||
mTrackNames.push_back(wxString::Format(wxT("%d - %s"), index, dflt));
|
||||
}
|
||||
|
||||
// Return the track name
|
||||
|
@ -665,7 +665,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||
}
|
||||
|
||||
// Extract the actual name.
|
||||
wxString fName = mTrackNames[mTrackNames.GetCount() - 1].AfterFirst(wxT('-')).Mid(1);
|
||||
wxString fName = mTrackNames[mTrackNames.size() - 1].AfterFirst(wxT('-')).Mid(1);
|
||||
|
||||
fName = FileNames::SelectFile(FileNames::Operation::Export,
|
||||
_("Export Labels As:"),
|
||||
|
|
|
@ -65,7 +65,7 @@ static bool TranslationExists(wxArrayString &audacityPathList, wxString code)
|
|||
audacityPathList,
|
||||
results);
|
||||
|
||||
return (results.GetCount() > 0);
|
||||
return (results.size() > 0);
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
|
@ -115,7 +115,7 @@ wxString GetSystemLanguageCode()
|
|||
wxString code = fullCode.Left(2);
|
||||
unsigned int i;
|
||||
|
||||
for(i=0; i<langCodes.GetCount(); i++) {
|
||||
for(i=0; i<langCodes.size(); i++) {
|
||||
if (langCodes[i] == fullCode)
|
||||
return fullCode;
|
||||
|
||||
|
@ -256,8 +256,8 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
|
|||
continue;
|
||||
|
||||
if (TranslationExists(audacityPathList, code) || code==wxT("en")) {
|
||||
tempCodes.Add(code);
|
||||
tempNames.Add(name);
|
||||
tempCodes.push_back(code);
|
||||
tempNames.push_back(name);
|
||||
tempHash[code] = name;
|
||||
|
||||
/* wxLogDebug(wxT("code=%s name=%s fullCode=%s name=%s -> %s"),
|
||||
|
@ -274,8 +274,8 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
|
|||
code = wxT("en-simple");
|
||||
name = wxT("Simplified");
|
||||
if (TranslationExists(audacityPathList, code) ) {
|
||||
tempCodes.Add(code);
|
||||
tempNames.Add(name);
|
||||
tempCodes.push_back(code);
|
||||
tempNames.push_back(name);
|
||||
tempHash[code] = name;
|
||||
}
|
||||
}
|
||||
|
@ -283,18 +283,18 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
|
|||
|
||||
// Sort
|
||||
unsigned int j;
|
||||
for(j=0; j<tempNames.GetCount(); j++){
|
||||
for(j=0; j<tempNames.size(); j++){
|
||||
reverseHash[tempNames[j]] = tempCodes[j];
|
||||
}
|
||||
|
||||
tempNames.Sort();
|
||||
std::sort( tempNames.begin(), tempNames.end() );
|
||||
|
||||
// Add system language
|
||||
langNames.Add(wxT("System"));
|
||||
langCodes.Add(wxT(""));
|
||||
langNames.push_back(wxT("System"));
|
||||
langCodes.push_back(wxT(""));
|
||||
|
||||
for(j=0; j<tempNames.GetCount(); j++) {
|
||||
langNames.Add(tempNames[j]);
|
||||
langCodes.Add(reverseHash[tempNames[j]]);
|
||||
for(j=0; j<tempNames.size(); j++) {
|
||||
langNames.push_back(tempNames[j]);
|
||||
langCodes.push_back(reverseHash[tempNames[j]]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -501,7 +501,7 @@ CommandFlag MenuManager::GetUpdateFlags
|
|||
if (undoManager.UnsavedChanges() || !project.IsProjectSaved())
|
||||
flags |= UnsavedChangesFlag;
|
||||
|
||||
if (!mLastEffect.IsEmpty())
|
||||
if (!mLastEffect.empty())
|
||||
flags |= HasLastEffectFlag;
|
||||
|
||||
if (project.UndoAvailable())
|
||||
|
|
|
@ -785,16 +785,16 @@ MusicalInstrument::MusicalInstrument(std::unique_ptr<wxBitmap> &&pBitmap, const
|
|||
while ((nUnderscoreIndex = strFilename.Find(wxT('_'))) != -1)
|
||||
{
|
||||
strKeyword = strFilename.Left(nUnderscoreIndex);
|
||||
mKeywords.Add(strKeyword);
|
||||
mKeywords.push_back(strKeyword);
|
||||
strFilename = strFilename.Mid(nUnderscoreIndex + 1);
|
||||
}
|
||||
if (!strFilename.IsEmpty()) // Skip trailing underscores.
|
||||
mKeywords.Add(strFilename); // Add the last one.
|
||||
if (!strFilename.empty()) // Skip trailing underscores.
|
||||
mKeywords.push_back(strFilename); // Add the last one.
|
||||
}
|
||||
|
||||
MusicalInstrument::~MusicalInstrument()
|
||||
{
|
||||
mKeywords.Clear();
|
||||
mKeywords.clear();
|
||||
}
|
||||
|
||||
|
||||
|
@ -899,7 +899,7 @@ MixerBoard::MixerBoard(AudacityProject* pProject,
|
|||
|
||||
/* This doesn't work to make the mScrolledWindow automatically resize, so do it explicitly in OnSize.
|
||||
auto pBoxSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
||||
pBoxSizer->Add(mScrolledWindow, 0, wxExpand, 0);
|
||||
pBoxSizer->push_back(mScrolledWindow, 0, wxExpand, 0);
|
||||
this->SetAutoLayout(true);
|
||||
this->SetSizer(pBoxSizer);
|
||||
pBoxSizer->Fit(this);
|
||||
|
@ -964,7 +964,7 @@ void MixerBoard::UpdatePrefs()
|
|||
mImageSoloDown.reset();
|
||||
mImageSoloDisabled.reset();
|
||||
}
|
||||
for (unsigned int nClusterIndex = 0; nClusterIndex < mMixerTrackClusters.GetCount(); nClusterIndex++)
|
||||
for (unsigned int nClusterIndex = 0; nClusterIndex < mMixerTrackClusters.size(); nClusterIndex++)
|
||||
mMixerTrackClusters[nClusterIndex]->UpdatePrefs();
|
||||
Refresh();
|
||||
#endif
|
||||
|
@ -1072,7 +1072,7 @@ wxBitmap* MixerBoard::GetMusicalInstrumentBitmap(const Track* pTrack)
|
|||
if (mMusicalInstruments.empty())
|
||||
return NULL;
|
||||
|
||||
// random choice: return mMusicalInstruments[(int)pTrack % mMusicalInstruments.GetCount()].mBitmap;
|
||||
// random choice: return mMusicalInstruments[(int)pTrack % mMusicalInstruments.size()].mBitmap;
|
||||
|
||||
const wxString strTrackName(pTrack->GetName().MakeLower());
|
||||
size_t nBestItemIndex = 0;
|
||||
|
@ -1086,7 +1086,7 @@ wxBitmap* MixerBoard::GetMusicalInstrumentBitmap(const Track* pTrack)
|
|||
{
|
||||
nScore = 0;
|
||||
|
||||
nNumKeywords = mMusicalInstruments[nInstrIndex]->mKeywords.GetCount();
|
||||
nNumKeywords = mMusicalInstruments[nInstrIndex]->mKeywords.size();
|
||||
if (nNumKeywords > 0)
|
||||
{
|
||||
nPointsPerMatch = 10 / nNumKeywords;
|
||||
|
|
|
@ -223,7 +223,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
|
|||
if (pathVar != wxT(""))
|
||||
wxGetApp().AddMultiPathsToPathList(pathVar, pathList);
|
||||
|
||||
for (i = 0; i < audacityPathList.GetCount(); i++) {
|
||||
for (i = 0; i < audacityPathList.size(); i++) {
|
||||
wxString prefix = audacityPathList[i] + wxFILE_SEP_PATH;
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("modules"),
|
||||
pathList);
|
||||
|
@ -236,7 +236,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
|
|||
#endif
|
||||
|
||||
wxString saveOldCWD = ::wxGetCwd();
|
||||
for (i = 0; i < files.GetCount(); i++) {
|
||||
for (i = 0; i < files.size(); i++) {
|
||||
// As a courtesy to some modules that might be bridges to
|
||||
// open other modules, we set the current working
|
||||
// directory to be the module's directory.
|
||||
|
@ -374,7 +374,7 @@ bool ModuleManager::DiscoverProviders()
|
|||
|
||||
PluginManager & pm = PluginManager::Get();
|
||||
|
||||
for (int i = 0, cnt = provList.GetCount(); i < cnt; i++)
|
||||
for (int i = 0, cnt = provList.size(); i < cnt; i++)
|
||||
{
|
||||
ModuleInterface *module = LoadModule(provList[i]);
|
||||
if (module)
|
||||
|
@ -555,7 +555,7 @@ bool ModuleManager::RegisterEffectPlugin(const PluginID & providerID, const wxSt
|
|||
ComponentInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID,
|
||||
const wxString & path)
|
||||
{
|
||||
if (path.IsEmpty() && mDynModules.find(providerID) != mDynModules.end())
|
||||
if (path.empty() && mDynModules.find(providerID) != mDynModules.end())
|
||||
{
|
||||
return mDynModules[providerID].get();
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ bool ModuleManager::IsProviderValid(const PluginID & WXUNUSED(providerID),
|
|||
const wxString & path)
|
||||
{
|
||||
// Builtin modules do not have a path
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ wxString PlatformCompatibility::ConvertSlashInFileName(const wxString& filePath)
|
|||
wxString filename;
|
||||
wxString newPath = filePath;
|
||||
// int pathLen = 1;
|
||||
while (!wxDirExists(wxPathOnly(newPath)) && ! path.IsEmpty()) {
|
||||
while (!wxDirExists(wxPathOnly(newPath)) && ! path.empty()) {
|
||||
path = newPath.BeforeLast('/');
|
||||
filename = newPath.AfterLast('/');
|
||||
newPath = path;
|
||||
|
|
|
@ -211,7 +211,7 @@ wxAccStatus CheckListAx::GetChildCount( int *childCount )
|
|||
// a document has a default action of "Press" rather than "Prints the current document."
|
||||
wxAccStatus CheckListAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionName )
|
||||
{
|
||||
actionName->Clear();
|
||||
actionName->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ wxAccStatus CheckListAx::GetDefaultAction( int WXUNUSED(childId), wxString *acti
|
|||
// Returns the description for this object or a child.
|
||||
wxAccStatus CheckListAx::GetDescription( int WXUNUSED(childId), wxString *description )
|
||||
{
|
||||
description->Clear();
|
||||
description->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ wxAccStatus CheckListAx::GetFocus( int *childId, wxAccessible **child )
|
|||
// Returns help text for this object or a child, similar to tooltip text.
|
||||
wxAccStatus CheckListAx::GetHelpText( int WXUNUSED(childId), wxString *helpText )
|
||||
{
|
||||
helpText->Clear();
|
||||
helpText->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ wxAccStatus CheckListAx::GetHelpText( int WXUNUSED(childId), wxString *helpText
|
|||
// Return e.g. ALT+K
|
||||
wxAccStatus CheckListAx::GetKeyboardShortcut( int WXUNUSED(childId), wxString *shortcut )
|
||||
{
|
||||
shortcut->Clear();
|
||||
shortcut->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ PluginRegistrationDialog::PluginRegistrationDialog(wxWindow *parent, EffectType
|
|||
mEffects = NULL;
|
||||
SetName(GetTitle());
|
||||
|
||||
mStates.SetCount(STATE_COUNT);
|
||||
mStates.resize(STATE_COUNT);
|
||||
mStates[STATE_Enabled] = _("Enabled");
|
||||
mStates[STATE_Disabled] = _("Disabled");
|
||||
mStates[STATE_New] = _("New");
|
||||
|
@ -612,7 +612,7 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
|
|||
colWidths.push_back(0);
|
||||
}
|
||||
|
||||
for (int i = 0, cnt = mStates.GetCount(); i < cnt; i++)
|
||||
for (int i = 0, cnt = mStates.size(); i < cnt; i++)
|
||||
{
|
||||
int x;
|
||||
mEffects->GetTextExtent(mStates[i], &x, NULL);
|
||||
|
@ -1477,7 +1477,7 @@ void PluginManager::FindFilesInPathList(const wxString & pattern,
|
|||
wxLogNull nolog;
|
||||
|
||||
// Why bother...
|
||||
if (pattern.IsEmpty())
|
||||
if (pattern.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1489,7 +1489,7 @@ void PluginManager::FindFilesInPathList(const wxString & pattern,
|
|||
// Add the "per-user" plug-ins directory
|
||||
{
|
||||
const wxFileName &ff = FileNames::PlugInDir();
|
||||
paths.Add(ff.GetFullPath());
|
||||
paths.push_back(ff.GetFullPath());
|
||||
}
|
||||
|
||||
// Add the "Audacity" plug-ins directory
|
||||
|
@ -1502,7 +1502,7 @@ void PluginManager::FindFilesInPathList(const wxString & pattern,
|
|||
ff.RemoveLastDir();
|
||||
#endif
|
||||
ff.AppendDir(wxT("plug-ins"));
|
||||
paths.Add(ff.GetPath());
|
||||
paths.push_back(ff.GetPath());
|
||||
|
||||
// Weed out duplicates
|
||||
for (size_t i = 0, cnt = pathList.size(); i < cnt; i++)
|
||||
|
@ -1511,12 +1511,12 @@ void PluginManager::FindFilesInPathList(const wxString & pattern,
|
|||
const wxString path{ ff.GetFullPath() };
|
||||
if (paths.Index(path, wxFileName::IsCaseSensitive()) == wxNOT_FOUND)
|
||||
{
|
||||
paths.Add(path);
|
||||
paths.push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
// Find all matching files in each path
|
||||
for (size_t i = 0, cnt = paths.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = paths.size(); i < cnt; i++)
|
||||
{
|
||||
ff = paths[i] + wxFILE_SEP_PATH + pattern;
|
||||
wxDir::GetAllFiles(ff.GetPath(), &files, ff.GetFullName(), directories ? wxDIR_DEFAULT : wxDIR_FILES);
|
||||
|
@ -1945,7 +1945,7 @@ void PluginManager::Load()
|
|||
}
|
||||
// Doing the deletion within the search loop risked skipping some items,
|
||||
// hence the delayed delete.
|
||||
for (unsigned int i = 0; i < groupsToDelete.Count(); i++) {
|
||||
for (unsigned int i = 0; i < groupsToDelete.size(); i++) {
|
||||
registry.DeleteGroup(groupsToDelete[i]);
|
||||
}
|
||||
registry.SetPath("");
|
||||
|
@ -1981,7 +1981,7 @@ void PluginManager::LoadGroup(wxFileConfig *pRegistry, PluginType type)
|
|||
wxFileName exeFn{ fullExePath };
|
||||
exeFn.SetEmptyExt();
|
||||
exeFn.SetName(wxString{});
|
||||
while(exeFn.GetDirCount() && !exeFn.GetDirs().Last().EndsWith(".app"))
|
||||
while(exeFn.GetDirCount() && !exeFn.GetDirs().back().EndsWith(".app"))
|
||||
exeFn.RemoveLastDir();
|
||||
|
||||
const auto goodPath = exeFn.GetPath();
|
||||
|
@ -2038,7 +2038,7 @@ void PluginManager::LoadGroup(wxFileConfig *pRegistry, PluginType type)
|
|||
if (!pRegistry->Read(KEY_PROVIDERID, &strVal, wxEmptyString))
|
||||
{
|
||||
// Bypass group if the provider isn't valid
|
||||
if (!strVal.IsEmpty() && mPlugins.find(strVal) == mPlugins.end())
|
||||
if (!strVal.empty() && mPlugins.find(strVal) == mPlugins.end())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -2201,7 +2201,7 @@ void PluginManager::LoadGroup(wxFileConfig *pRegistry, PluginType type)
|
|||
wxStringTokenizer tkr(strVal, wxT(":"));
|
||||
while (tkr.HasMoreTokens())
|
||||
{
|
||||
extensions.Add(tkr.GetNextToken());
|
||||
extensions.push_back(tkr.GetNextToken());
|
||||
}
|
||||
plug.SetImporterExtensions(extensions);
|
||||
}
|
||||
|
@ -2364,7 +2364,7 @@ void PluginManager::CheckForUpdates(bool bFast)
|
|||
continue;
|
||||
}
|
||||
|
||||
pathIndex.Add(plug.GetPath().BeforeFirst(wxT(';')));
|
||||
pathIndex.push_back(plug.GetPath().BeforeFirst(wxT(';')));
|
||||
}
|
||||
|
||||
// Check all known plugins to ensure they are still valid and scan for NEW ones.
|
||||
|
@ -2406,7 +2406,7 @@ void PluginManager::CheckForUpdates(bool bFast)
|
|||
{
|
||||
// Collect plugin paths
|
||||
wxArrayString paths = mm.FindPluginsForProvider(plugID, plugPath);
|
||||
for (size_t i = 0, cnt = paths.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = paths.size(); i < cnt; i++)
|
||||
{
|
||||
wxString path = paths[i].BeforeFirst(wxT(';'));;
|
||||
if (pathIndex.Index(path) == wxNOT_FOUND)
|
||||
|
@ -2789,7 +2789,7 @@ bool PluginManager::HasGroup(const wxString & group)
|
|||
|
||||
bool PluginManager::GetSubgroups(const wxString & group, wxArrayString & subgroups)
|
||||
{
|
||||
if (group.IsEmpty() || !HasGroup(group))
|
||||
if (group.empty() || !HasGroup(group))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -2803,7 +2803,7 @@ bool PluginManager::GetSubgroups(const wxString & group, wxArrayString & subgrou
|
|||
{
|
||||
do
|
||||
{
|
||||
subgroups.Add(name);
|
||||
subgroups.push_back(name);
|
||||
} while (GetSettings()->GetNextGroup(name, index));
|
||||
}
|
||||
|
||||
|
@ -2816,7 +2816,7 @@ bool PluginManager::GetConfig(const wxString & key, int & value, int defval)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Read(key, &value, defval);
|
||||
}
|
||||
|
@ -2828,7 +2828,7 @@ bool PluginManager::GetConfig(const wxString & key, wxString & value, const wxSt
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
wxString wxval = wxEmptyString;
|
||||
|
||||
|
@ -2844,7 +2844,7 @@ bool PluginManager::GetConfig(const wxString & key, bool & value, bool defval)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Read(key, &value, defval);
|
||||
}
|
||||
|
@ -2856,7 +2856,7 @@ bool PluginManager::GetConfig(const wxString & key, float & value, float defval)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
double dval = 0.0;
|
||||
|
||||
|
@ -2872,7 +2872,7 @@ bool PluginManager::GetConfig(const wxString & key, double & value, double defva
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Read(key, &value, defval);
|
||||
}
|
||||
|
@ -2884,7 +2884,7 @@ bool PluginManager::SetConfig(const wxString & key, const wxString & value)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
wxString wxval = value;
|
||||
result = GetSettings()->Write(key, wxval);
|
||||
|
@ -2901,7 +2901,7 @@ bool PluginManager::SetConfig(const wxString & key, const int & value)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Write(key, value);
|
||||
if (result)
|
||||
|
@ -2917,7 +2917,7 @@ bool PluginManager::SetConfig(const wxString & key, const bool & value)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Write(key, value);
|
||||
if (result)
|
||||
|
@ -2933,7 +2933,7 @@ bool PluginManager::SetConfig(const wxString & key, const float & value)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Write(key, value);
|
||||
if (result)
|
||||
|
@ -2949,7 +2949,7 @@ bool PluginManager::SetConfig(const wxString & key, const double & value)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if (!key.IsEmpty())
|
||||
if (!key.empty())
|
||||
{
|
||||
result = GetSettings()->Write(key, value);
|
||||
if (result)
|
||||
|
@ -2997,7 +2997,7 @@ wxString PluginManager::SharedGroup(const PluginID & ID, const wxString & group)
|
|||
wxString path = SettingsPath(ID, true);
|
||||
|
||||
wxFileName ff(group);
|
||||
if (!ff.GetName().IsEmpty())
|
||||
if (!ff.GetName().empty())
|
||||
{
|
||||
path += ff.GetFullPath(wxPATH_UNIX) + wxCONFIG_PATH_SEPARATOR;
|
||||
}
|
||||
|
@ -3009,7 +3009,7 @@ wxString PluginManager::SharedGroup(const PluginID & ID, const wxString & group)
|
|||
wxString PluginManager::SharedKey(const PluginID & ID, const wxString & group, const wxString & key)
|
||||
{
|
||||
wxString path = SharedGroup(ID, group);
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
@ -3023,7 +3023,7 @@ wxString PluginManager::PrivateGroup(const PluginID & ID, const wxString & group
|
|||
wxString path = SettingsPath(ID, false);
|
||||
|
||||
wxFileName ff(group);
|
||||
if (!ff.GetName().IsEmpty())
|
||||
if (!ff.GetName().empty())
|
||||
{
|
||||
path += ff.GetFullPath(wxPATH_UNIX) + wxCONFIG_PATH_SEPARATOR;
|
||||
}
|
||||
|
@ -3035,7 +3035,7 @@ wxString PluginManager::PrivateGroup(const PluginID & ID, const wxString & group
|
|||
wxString PluginManager::PrivateKey(const PluginID & ID, const wxString & group, const wxString & key)
|
||||
{
|
||||
wxString path = PrivateGroup(ID, group);
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ void InitPreferences()
|
|||
}
|
||||
|
||||
// Use the system default language if one wasn't specified or if the user selected System.
|
||||
if (langCode.IsEmpty())
|
||||
if (langCode.empty())
|
||||
{
|
||||
langCode = GetSystemLanguageCode();
|
||||
}
|
||||
|
|
|
@ -1568,10 +1568,10 @@ void AudacityProject::SetProjectTitle( int number)
|
|||
if( number >= 0 ){
|
||||
/* i18n-hint: The %02i is the project number, the %s is the project name.*/
|
||||
name = wxString::Format( _TS("[Project %02i] Audacity \"%s\""), number+1 ,
|
||||
name.IsEmpty() ? "<untitled>" : (const char *)name );
|
||||
name.empty() ? "<untitled>" : (const char *)name );
|
||||
}
|
||||
// If we are not showing numbers, then <untitled> shows as 'Audacity'.
|
||||
else if( name.IsEmpty() )
|
||||
else if( name.empty() )
|
||||
{
|
||||
mbLoadedFromAup = false;
|
||||
name = _TS("Audacity");
|
||||
|
@ -2172,7 +2172,7 @@ int AudacityProject::CountUnnamed()
|
|||
int j = 0;
|
||||
for ( size_t i = 0; i < gAudacityProjects.size(); i++) {
|
||||
if ( gAudacityProjects[i] )
|
||||
if ( gAudacityProjects[i]->GetName().IsEmpty() )
|
||||
if ( gAudacityProjects[i]->GetName().empty() )
|
||||
j++;
|
||||
}
|
||||
return j;
|
||||
|
@ -2469,7 +2469,7 @@ public:
|
|||
// Construct this projects name and number.
|
||||
sProjNumber = "";
|
||||
sProjName = p->GetName();
|
||||
if (sProjName.IsEmpty()){
|
||||
if (sProjName.empty()){
|
||||
sProjName = _("<untitled>");
|
||||
UnnamedCount=AudacityProject::CountUnnamed();
|
||||
if( UnnamedCount > 1 ){
|
||||
|
@ -2740,7 +2740,7 @@ void AudacityProject::OnOpenAudioFile(wxCommandEvent & event)
|
|||
{
|
||||
const wxString &cmd = event.GetString();
|
||||
|
||||
if (!cmd.IsEmpty()) {
|
||||
if (!cmd.empty()) {
|
||||
OpenFile(cmd);
|
||||
}
|
||||
|
||||
|
@ -2880,7 +2880,7 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
|
|||
* with Audacity. Do not include pipe symbols or .aup (this extension will
|
||||
* now be added automatically for the Save Projects dialogues).*/
|
||||
wxArrayString selectedFiles = ShowOpenDialog(_("Audacity projects"), wxT("*.aup"));
|
||||
if (selectedFiles.GetCount() == 0) {
|
||||
if (selectedFiles.size() == 0) {
|
||||
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
|
||||
gPrefs->Flush();
|
||||
return;
|
||||
|
@ -2897,7 +2897,7 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
|
|||
gPrefs->Flush();
|
||||
} );
|
||||
|
||||
for (size_t ff = 0; ff < selectedFiles.GetCount(); ff++) {
|
||||
for (size_t ff = 0; ff < selectedFiles.size(); ff++) {
|
||||
const wxString &fileName = selectedFiles[ff];
|
||||
|
||||
// Make sure it isn't already open.
|
||||
|
@ -3478,7 +3478,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
realFileName = realFileName.Left(realFileName.Length() - 5);
|
||||
}
|
||||
|
||||
if (realFileName.IsEmpty())
|
||||
if (realFileName.empty())
|
||||
{
|
||||
// A previously unsaved project has been recovered, so fake
|
||||
// an unsaved project. The data files just stay in the temp
|
||||
|
@ -3502,7 +3502,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
projPath = wxPathOnly(mFileName);
|
||||
}
|
||||
|
||||
if (!projName.IsEmpty())
|
||||
if (!projName.empty())
|
||||
{
|
||||
// First try to load the data files based on the _data dir given in the .aup file
|
||||
// If this fails then try to use the filename of the .aup as the base directory
|
||||
|
@ -4321,7 +4321,7 @@ bool AudacityProject::Import(const wxString &fileName, WaveTrackArray* pTrackArr
|
|||
mTags.get(),
|
||||
errorMessage);
|
||||
|
||||
if (!errorMessage.IsEmpty()) {
|
||||
if (!errorMessage.empty()) {
|
||||
// Error message derived from Importer::Import
|
||||
// Additional help via a Help button links to the manual.
|
||||
ShowErrorDialog(this, _("Error Importing"),
|
||||
|
@ -4433,7 +4433,7 @@ bool AudacityProject::SaveAs(bool bWantSaveCopy /*= false*/, bool bLossless /*=
|
|||
bWantSaveCopy = true;
|
||||
|
||||
// Bug 1304: Set a default file path if none was given. For Save/SaveAs
|
||||
if( filename.GetFullPath().IsEmpty() ){
|
||||
if( filename.GetFullPath().empty() ){
|
||||
bHasPath = false;
|
||||
filename = FileNames::DefaultToDocumentsFolder(wxT("/SaveAs/Path"));
|
||||
}
|
||||
|
@ -4478,7 +4478,7 @@ For an audio file that will open in other apps, use 'Export'.\n");
|
|||
return false;
|
||||
}
|
||||
|
||||
bool bPrompt = (mBatchMode == 0) || (mFileName.IsEmpty());
|
||||
bool bPrompt = (mBatchMode == 0) || (mFileName.empty());
|
||||
wxString fName = "";
|
||||
|
||||
if (bPrompt) {
|
||||
|
@ -5123,7 +5123,7 @@ void AudacityProject::AutoSave()
|
|||
// file with the extension ".tmp", then rename the file to .autosave
|
||||
wxString projName;
|
||||
|
||||
if (mFileName.IsEmpty())
|
||||
if (mFileName.empty())
|
||||
projName = wxT("New Project");
|
||||
else
|
||||
projName = wxFileName(mFileName).GetName();
|
||||
|
@ -5140,7 +5140,7 @@ void AudacityProject::AutoSave()
|
|||
AutoSaveFile buffer;
|
||||
WriteXMLHeader(buffer);
|
||||
WriteXML(buffer, false);
|
||||
mStrOtherNamesArray.Clear();
|
||||
mStrOtherNamesArray.clear();
|
||||
|
||||
wxFFile saveFile;
|
||||
saveFile.Open(fn + wxT(".tmp"), wxT("wb"));
|
||||
|
@ -5153,7 +5153,7 @@ void AudacityProject::AutoSave()
|
|||
// Now that we have a NEW auto-save file, DELETE the old one
|
||||
DeleteCurrentAutoSaveFile();
|
||||
|
||||
if (!mAutoSaveFileName.IsEmpty())
|
||||
if (!mAutoSaveFileName.empty())
|
||||
return; // could not remove auto-save file
|
||||
|
||||
if (!wxRenameFile(fn + wxT(".tmp"), fn + wxT(".autosave")))
|
||||
|
@ -5173,7 +5173,7 @@ void AudacityProject::AutoSave()
|
|||
|
||||
void AudacityProject::DeleteCurrentAutoSaveFile()
|
||||
{
|
||||
if (!mAutoSaveFileName.IsEmpty())
|
||||
if (!mAutoSaveFileName.empty())
|
||||
{
|
||||
if (wxFileExists(mAutoSaveFileName))
|
||||
{
|
||||
|
@ -5293,7 +5293,7 @@ You are saving directly to a slow external storage device\n\
|
|||
void AudacityProject::OnAudioIONewBlockFiles(const AutoSaveFile & blockFileLog)
|
||||
{
|
||||
// New blockfiles have been created, so add them to the auto-save file
|
||||
if (!mAutoSaveFileName.IsEmpty())
|
||||
if (!mAutoSaveFileName.empty())
|
||||
{
|
||||
wxFFile f(mAutoSaveFileName, wxT("ab"));
|
||||
if (!f.IsOpened())
|
||||
|
|
|
@ -993,7 +993,7 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
|
|||
SeqBlock &block = mBlock[b];
|
||||
if (block.start != numSamples) {
|
||||
wxString sFileAndExtension = block.f->GetFileName().name.GetFullName();
|
||||
if (sFileAndExtension.IsEmpty())
|
||||
if (sFileAndExtension.empty())
|
||||
sFileAndExtension = wxT("(replaced with silence)");
|
||||
else
|
||||
sFileAndExtension = wxT("\"") + sFileAndExtension + wxT("\"");
|
||||
|
|
|
@ -83,7 +83,7 @@ bool Shuttle::TransferBool( const wxString & Name, bool & bValue, const bool & b
|
|||
bValue = bDefault;
|
||||
if( ExchangeWithMaster( Name ))
|
||||
{
|
||||
if( !mValueString.IsEmpty() )
|
||||
if( !mValueString.empty() )
|
||||
bValue = mValueString.GetChar(0) == wxT('y');
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ bool Shuttle::TransferFloat( const wxString & Name, float & fValue, const float
|
|||
fValue = fDefault;
|
||||
if( ExchangeWithMaster( Name ))
|
||||
{
|
||||
if( !mValueString.IsEmpty() )
|
||||
if( !mValueString.empty() )
|
||||
fValue = wxAtof( mValueString );
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ bool Shuttle::TransferDouble( const wxString & Name, double & dValue, const doub
|
|||
dValue = dDefault;
|
||||
if( ExchangeWithMaster( Name ))
|
||||
{
|
||||
if( !mValueString.IsEmpty() )
|
||||
if( !mValueString.empty() )
|
||||
dValue = wxAtof( mValueString );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt)
|
|||
TieCheckBox( "", *pVar);
|
||||
//return;
|
||||
}
|
||||
if( Prompt.IsEmpty() )
|
||||
if( Prompt.empty() )
|
||||
return;
|
||||
miProp=1;
|
||||
mpWind = safenew wxStaticText(GetParent(), -1, Prompt, wxDefaultPosition, wxDefaultSize,
|
||||
|
@ -259,7 +259,7 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt)
|
|||
/// Left aligned text string.
|
||||
void ShuttleGuiBase::AddUnits(const wxString &Prompt)
|
||||
{
|
||||
if( Prompt.IsEmpty() )
|
||||
if( Prompt.empty() )
|
||||
return;
|
||||
if( mShuttleMode != eIsCreating )
|
||||
return;
|
||||
|
@ -273,7 +273,7 @@ void ShuttleGuiBase::AddUnits(const wxString &Prompt)
|
|||
/// Centred text string.
|
||||
void ShuttleGuiBase::AddTitle(const wxString &Prompt)
|
||||
{
|
||||
if( Prompt.IsEmpty() )
|
||||
if( Prompt.empty() )
|
||||
return;
|
||||
if( mShuttleMode != eIsCreating )
|
||||
return;
|
||||
|
@ -313,7 +313,7 @@ wxCheckBox * ShuttleGuiBase::AddCheckBox( const wxString &Prompt, const wxString
|
|||
mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, realPrompt, wxDefaultPosition, wxDefaultSize,
|
||||
Style( 0 ));
|
||||
pCheckBox->SetValue(Selected == wxT("true"));
|
||||
if (realPrompt.IsEmpty()) {
|
||||
if (realPrompt.empty()) {
|
||||
// NVDA 2018.3 does not read controls which are buttons, check boxes or radio buttons which have
|
||||
// an accessibility name which is empty. Bug 1980.
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
@ -455,7 +455,7 @@ wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &S
|
|||
wxComboBox * pCombo;
|
||||
miProp=0;
|
||||
|
||||
int n = pChoices->GetCount();
|
||||
int n = pChoices->size();
|
||||
if( n>50 ) n=50;
|
||||
int i;
|
||||
wxString Choices[50];
|
||||
|
@ -1379,7 +1379,7 @@ wxChoice * ShuttleGuiBase::TieChoice(
|
|||
else
|
||||
{
|
||||
wxString Temp;
|
||||
if( pChoices && ( WrappedRef.ReadAsInt() < (int)pChoices->GetCount() ) )
|
||||
if( pChoices && ( WrappedRef.ReadAsInt() < (int)pChoices->size() ) )
|
||||
{
|
||||
Temp = (*pChoices)[WrappedRef.ReadAsInt()];
|
||||
}
|
||||
|
@ -1624,7 +1624,7 @@ wxString ShuttleGuiBase::TranslateFromIndex( const int nIn, const wxArrayString
|
|||
if( n== wxNOT_FOUND )
|
||||
n=miNoMatchSelector;
|
||||
miNoMatchSelector = 0;
|
||||
if( n < (int)Choices.GetCount() )
|
||||
if( n < (int)Choices.size() )
|
||||
{
|
||||
return Choices[n];
|
||||
}
|
||||
|
@ -2332,7 +2332,7 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
|
|||
size_t lastLastSpacer = 0;
|
||||
size_t lastSpacer = 0;
|
||||
wxSizerItemList & list = bs->GetChildren();
|
||||
for( size_t i = 0, cnt = list.GetCount(); i < cnt; i++ )
|
||||
for( size_t i = 0, cnt = list.size(); i < cnt; i++ )
|
||||
{
|
||||
if( list[i]->IsSpacer() )
|
||||
{
|
||||
|
@ -2382,7 +2382,7 @@ void ShuttleGuiBase::SetSizeHints( wxWindow *window, const wxArrayString & items
|
|||
{
|
||||
int maxw = 0;
|
||||
|
||||
for( size_t i = 0; i < items.GetCount(); i++ )
|
||||
for( size_t i = 0; i < items.size(); i++ )
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -2470,7 +2470,7 @@ wxChoice * ShuttleGuiGetDefinition::TieChoice(
|
|||
AddItem( Default, "default" );
|
||||
StartField( "enum" );
|
||||
StartArray();
|
||||
for( size_t i=0;i<Choices.Count(); i++ )
|
||||
for( size_t i=0;i<Choices.size(); i++ )
|
||||
AddItem( InternalChoices[i] );
|
||||
EndArray();
|
||||
EndField();
|
||||
|
@ -2498,7 +2498,7 @@ wxChoice * ShuttleGuiGetDefinition::TieChoice(
|
|||
AddItem( Default, "default" );
|
||||
StartField( "enum" );
|
||||
StartArray();
|
||||
for( size_t i=0;i<Choices.Count(); i++ )
|
||||
for( size_t i=0;i<Choices.size(); i++ )
|
||||
AddItem( Choices[i] );
|
||||
EndArray();
|
||||
EndField();
|
||||
|
|
26
src/Tags.cpp
26
src/Tags.cpp
|
@ -350,14 +350,14 @@ void Tags::AllowEditTrackNumber(bool editTrackNumber)
|
|||
|
||||
int Tags::GetNumUserGenres()
|
||||
{
|
||||
return mGenres.GetCount();
|
||||
return mGenres.size();
|
||||
}
|
||||
|
||||
void Tags::LoadDefaultGenres()
|
||||
{
|
||||
mGenres.Clear();
|
||||
mGenres.clear();
|
||||
for (size_t i = 0; i < WXSIZEOF(DefaultGenres); i++) {
|
||||
mGenres.Add(DefaultGenres[i]);
|
||||
mGenres.push_back(DefaultGenres[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,11 +371,11 @@ void Tags::LoadGenres()
|
|||
return;
|
||||
}
|
||||
|
||||
mGenres.Clear();
|
||||
mGenres.clear();
|
||||
|
||||
int cnt = tf.GetLineCount();
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
mGenres.Add(tf.GetLine(i));
|
||||
mGenres.push_back(tf.GetLine(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ Tags::Iterators Tags::GetRange() const
|
|||
void Tags::SetTag(const wxString & name, const wxString & value)
|
||||
{
|
||||
// We don't like empty names
|
||||
if (name.IsEmpty()) {
|
||||
if (name.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ void Tags::SetTag(const wxString & name, const wxString & value)
|
|||
// Look it up
|
||||
TagMap::iterator iter = mXref.find(key);
|
||||
|
||||
if (value.IsEmpty()) {
|
||||
if (value.empty()) {
|
||||
// Erase the tag
|
||||
if (iter == mXref.end())
|
||||
// nothing to do
|
||||
|
@ -513,7 +513,7 @@ bool Tags::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
|
||||
while (*attrs) {
|
||||
wxString attr = *attrs++;
|
||||
if (attr.IsEmpty())
|
||||
if (attr.empty())
|
||||
break;
|
||||
wxString value = *attrs++;
|
||||
|
||||
|
@ -942,7 +942,7 @@ bool TagsEditor::TransferDataFromWindow()
|
|||
wxString n = mGrid->GetCellValue(i, 0);
|
||||
wxString v = mGrid->GetCellValue(i, 1);
|
||||
|
||||
if (n.IsEmpty()) {
|
||||
if (n.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event))
|
|||
wxArrayString g;
|
||||
int cnt = mLocal.GetNumUserGenres();
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
g.Add(mLocal.GetUserGenre(i));
|
||||
g.push_back(mLocal.GetUserGenre(i));
|
||||
}
|
||||
std::sort( g.begin(), g.end() );
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ void TagsEditor::OnLoad(wxCommandEvent & WXUNUSED(event))
|
|||
this);
|
||||
|
||||
// User canceled...
|
||||
if (fn.IsEmpty()) {
|
||||
if (fn.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1242,7 +1242,7 @@ void TagsEditor::OnSave(wxCommandEvent & WXUNUSED(event))
|
|||
this);
|
||||
|
||||
// User canceled...
|
||||
if (fn.IsEmpty()) {
|
||||
if (fn.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1431,7 +1431,7 @@ void TagsEditor::PopulateGenres()
|
|||
wxArrayString g;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
g.Add(mLocal.GetUserGenre(i));
|
||||
g.push_back(mLocal.GetUserGenre(i));
|
||||
}
|
||||
std::sort( g.begin(), g.end() );
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ void ThemeBase::RegisterImage( int &iIndex, const wxImage &Image, const wxString
|
|||
mBitmaps.push_back( wxBitmap( Image ) );
|
||||
#endif
|
||||
|
||||
mBitmapNames.Add( Name );
|
||||
mBitmapNames.push_back( Name );
|
||||
mBitmapFlags.push_back( mFlow.mFlags );
|
||||
mFlow.mFlags &= ~resFlagSkip;
|
||||
iIndex = mBitmaps.size() - 1;
|
||||
|
@ -496,7 +496,7 @@ void ThemeBase::RegisterColour( int &iIndex, const wxColour &Clr, const wxString
|
|||
{
|
||||
wxASSERT( iIndex == -1 ); // Don't initialise same colour twice!
|
||||
mColours.push_back( Clr );
|
||||
mColourNames.Add( Name );
|
||||
mColourNames.push_back( Name );
|
||||
iIndex = mColours.size() - 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -497,7 +497,7 @@ bool TimerRecordDialog::RemoveAllAutoSaveFiles()
|
|||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.GetCount(); i++)
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
if (!wxRemoveFile(files[i]))
|
||||
{
|
||||
|
@ -934,13 +934,13 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
|
|||
arrayOptions.Add(_("Restart system"));
|
||||
arrayOptions.Add(_("Shutdown system"));
|
||||
|
||||
m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(0));
|
||||
m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(1));
|
||||
m_sTimerAfterCompleteOptionsArray.push_back(arrayOptions[0]);
|
||||
m_sTimerAfterCompleteOptionsArray.push_back(arrayOptions[1]);
|
||||
#ifdef __WINDOWS__
|
||||
m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(2));
|
||||
m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(3));
|
||||
m_sTimerAfterCompleteOptionsArray.push_back(arrayOptions[2]);
|
||||
m_sTimerAfterCompleteOptionsArray.push_back(arrayOptions[3]);
|
||||
#endif
|
||||
m_sTimerAfterCompleteOption = arrayOptions.Item(iPostTimerRecordAction);
|
||||
m_sTimerAfterCompleteOption = arrayOptions[iPostTimerRecordAction];
|
||||
|
||||
m_pTimerAfterCompleteChoiceCtrl = S.AddChoice(_("After Recording completes:"),
|
||||
m_sTimerAfterCompleteOption,
|
||||
|
|
|
@ -328,7 +328,7 @@ void TrackArt::DrawTrack(TrackPanelDrawingContext &context,
|
|||
if (bShowTrackNameInWaveform &&
|
||||
wt->IsLeader() &&
|
||||
// Exclude empty name.
|
||||
!wt->GetName().IsEmpty()) {
|
||||
!wt->GetName().empty()) {
|
||||
wxBrush Brush;
|
||||
wxCoord x,y;
|
||||
wxFont labelFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
|
|
|
@ -255,7 +255,7 @@ wxAccStatus TrackPanelAx::GetChildCount( int* childCount )
|
|||
// a document has a default action of "Press" rather than "Prints the current document."
|
||||
wxAccStatus TrackPanelAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionName )
|
||||
{
|
||||
actionName->Clear();
|
||||
actionName->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ wxAccStatus TrackPanelAx::GetDefaultAction( int WXUNUSED(childId), wxString *act
|
|||
// Returns the description for this object or a child.
|
||||
wxAccStatus TrackPanelAx::GetDescription( int WXUNUSED(childId), wxString *description )
|
||||
{
|
||||
description->Clear();
|
||||
description->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ wxAccStatus TrackPanelAx::GetDescription( int WXUNUSED(childId), wxString *descr
|
|||
// Returns help text for this object or a child, similar to tooltip text.
|
||||
wxAccStatus TrackPanelAx::GetHelpText( int WXUNUSED(childId), wxString *helpText )
|
||||
{
|
||||
helpText->Clear();
|
||||
helpText->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ wxAccStatus TrackPanelAx::GetHelpText( int WXUNUSED(childId), wxString *helpText
|
|||
// Return e.g. ALT+K
|
||||
wxAccStatus TrackPanelAx::GetKeyboardShortcut( int WXUNUSED(childId), wxString *shortcut )
|
||||
{
|
||||
shortcut->Clear();
|
||||
shortcut->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ void UndoManager::StateSaved()
|
|||
// currently unused
|
||||
//void UndoManager::Debug()
|
||||
//{
|
||||
// for (unsigned int i = 0; i < stack.Count(); i++) {
|
||||
// for (unsigned int i = 0; i < stack.size(); i++) {
|
||||
// for (auto t : stack[i]->tracks->Any())
|
||||
// wxPrintf(wxT("*%d* %s %f\n"),
|
||||
// i, (i == (unsigned int)current) ? wxT("-->") : wxT(" "),
|
||||
|
|
|
@ -272,7 +272,7 @@ AudacityCommandDialog::AudacityCommandDialog(wxWindow * parent,
|
|||
wxASSERT( pCommand );
|
||||
mpCommand = pCommand;
|
||||
mAdditionalButtons = additionalButtons |eCancelButton;
|
||||
if( !pCommand->ManualPage().IsEmpty() )
|
||||
if( !pCommand->ManualPage().empty() )
|
||||
mAdditionalButtons |= eHelpButton;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ bool BatchEvalCommand::Apply(const CommandContext & context)
|
|||
bool bResult = Batch.ApplyCommandInBatchMode(friendly, cmdName, cmdParams, &context);
|
||||
// Relay messages, if any.
|
||||
wxString Message = Batch.GetMessage();
|
||||
if( !Message.IsEmpty() )
|
||||
if( !Message.empty() )
|
||||
context.Status( Message );
|
||||
return bResult;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void CommandBuilder::BuildCommand(const wxString &cmdName,
|
|||
// You start and end with a " or a '.
|
||||
// There is no escaping in the string.
|
||||
cmdParams = cmdParams.Mid(splitAt+1);
|
||||
if( cmdParams.IsEmpty() )
|
||||
if( cmdParams.empty() )
|
||||
splitAt =-1;
|
||||
else if( cmdParams[0] == '\"' ){
|
||||
cmdParams = cmdParams.Mid(1);
|
||||
|
|
|
@ -994,7 +994,7 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & nameIn,
|
|||
|
||||
entry->name = name;
|
||||
entry->label = label;
|
||||
entry->longLabel = longLabel.IsEmpty() ? label : longLabel;
|
||||
entry->longLabel = longLabel.empty() ? label : longLabel;
|
||||
entry->hasDialog = hasDialog;
|
||||
entry->key = NormalizedKeyString{ accel.BeforeFirst(wxT('\t')) };
|
||||
entry->defaultKey = entry->key;
|
||||
|
@ -1549,7 +1549,7 @@ bool CommandManager::HandleMenuID(int id, CommandFlag flags, CommandMask mask)
|
|||
/// code to run.
|
||||
bool CommandManager::HandleTextualCommand(const wxString & Str, const CommandContext & context, CommandFlag flags, CommandMask mask)
|
||||
{
|
||||
if( Str.IsEmpty() )
|
||||
if( Str.empty() )
|
||||
return false;
|
||||
// Linear search for now...
|
||||
for (const auto &entry : mCommandList)
|
||||
|
@ -1599,18 +1599,18 @@ bool CommandManager::HandleTextualCommand(const wxString & Str, const CommandCon
|
|||
|
||||
void CommandManager::GetCategories(wxArrayString &cats)
|
||||
{
|
||||
cats.Clear();
|
||||
cats.clear();
|
||||
|
||||
for (const auto &entry : mCommandList) {
|
||||
wxString cat = entry->labelTop;
|
||||
if (cats.Index(cat) == wxNOT_FOUND) {
|
||||
cats.Add(cat);
|
||||
cats.push_back(cat);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
mCommandList.GetCount(); i++) {
|
||||
mCommandList.size(); i++) {
|
||||
if (includeMultis || !mCommandList[i]->multi)
|
||||
names.Add(mCommandList[i]->name);
|
||||
names.push_back(mCommandList[i]->name);
|
||||
}
|
||||
|
||||
AudacityProject *p = GetActiveProject();
|
||||
|
@ -1621,10 +1621,10 @@ void CommandManager::GetCategories(wxArrayString &cats)
|
|||
wxMenuBar *bar = p->GetMenuBar();
|
||||
size_t cnt = bar->GetMenuCount();
|
||||
for (size_t i = 0; i < cnt; i++) {
|
||||
cats.Add(bar->GetMenuLabelText(i));
|
||||
cats.push_back(bar->GetMenuLabelText(i));
|
||||
}
|
||||
|
||||
cats.Add(COMMAND);
|
||||
cats.push_back(COMMAND);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1635,9 +1635,9 @@ void CommandManager::GetAllCommandNames(wxArrayString &names,
|
|||
if ( entry->isEffect )
|
||||
continue;
|
||||
if (!entry->multi)
|
||||
names.Add(entry->name);
|
||||
names.push_back(entry->name);
|
||||
else if( includeMultis )
|
||||
names.Add(entry->name );// + wxT(":")/*+ mCommandList[i]->label*/);
|
||||
names.push_back(entry->name );// + wxT(":")/*+ mCommandList[i]->label*/);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1654,9 +1654,9 @@ void CommandManager::GetAllCommandLabels(wxArrayString &names,
|
|||
if ( entry->isEffect )
|
||||
continue;
|
||||
if (!entry->multi)
|
||||
names.Add(entry->longLabel), vHasDialog.push_back(entry->hasDialog);
|
||||
names.push_back(entry->longLabel), vHasDialog.push_back(entry->hasDialog);
|
||||
else if( includeMultis )
|
||||
names.Add(entry->longLabel), vHasDialog.push_back(entry->hasDialog);
|
||||
names.push_back(entry->longLabel), vHasDialog.push_back(entry->hasDialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1678,24 +1678,24 @@ void CommandManager::GetAllCommandData(
|
|||
// continue;
|
||||
if (!entry->multi)
|
||||
{
|
||||
names.Add(entry->name);
|
||||
names.push_back(entry->name);
|
||||
keys.push_back(entry->key);
|
||||
default_keys.push_back(entry->defaultKey);
|
||||
labels.Add(entry->label);
|
||||
categories.Add(entry->labelTop);
|
||||
labels.push_back(entry->label);
|
||||
categories.push_back(entry->labelTop);
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
prefixes.Add(entry->labelPrefix);
|
||||
prefixes.push_back(entry->labelPrefix);
|
||||
#endif
|
||||
}
|
||||
else if( includeMultis )
|
||||
{
|
||||
names.Add(entry->name);
|
||||
names.push_back(entry->name);
|
||||
keys.push_back(entry->key);
|
||||
default_keys.push_back(entry->defaultKey);
|
||||
labels.Add(entry->label);
|
||||
categories.Add(entry->labelTop);
|
||||
labels.push_back(entry->label);
|
||||
categories.push_back(entry->labelTop);
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
prefixes.Add(entry->labelPrefix);
|
||||
prefixes.push_back(entry->labelPrefix);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1726,7 +1726,7 @@ wxString CommandManager::GetPrefixedLabelFromName(const wxString &name)
|
|||
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
wxString prefix;
|
||||
if (!entry->labelPrefix.IsEmpty()) {
|
||||
if (!entry->labelPrefix.empty()) {
|
||||
prefix = entry->labelPrefix + wxT(" - ");
|
||||
}
|
||||
return wxMenuItem::GetLabelText(prefix + entry->label);
|
||||
|
|
|
@ -59,7 +59,7 @@ void CommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
|||
wxString Padding;
|
||||
Padding.Pad( mCounts.size() *2 -2);
|
||||
Padding = (( value.length() < 15 ) || (mCounts.back()<=0)) ? "" : wxString("\n") + Padding;
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%s\"%s\"", (mCounts.back()>0)?", ":"", Padding, Escaped(value)));
|
||||
else
|
||||
Update( wxString::Format( "%s%s\"%s\":\"%s\"", (mCounts.back()>0)?", ":"", Padding, name, Escaped(value)));
|
||||
|
@ -67,14 +67,14 @@ void CommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
|||
}
|
||||
|
||||
void CommandMessageTarget::AddBool(const bool value, const wxString &name){
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s\"%s\"", (mCounts.back()>0)?", ":"", value?"true":"false"));
|
||||
else
|
||||
Update( wxString::Format( "%s\"%s\":\"%s\"", (mCounts.back()>0)?", ":"", name,value?"true":"false"));
|
||||
mCounts.back() += 1;
|
||||
}
|
||||
void CommandMessageTarget::AddItem(const double value, const wxString &name){
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%g", (mCounts.back()>0)?", ":"", value));
|
||||
else
|
||||
Update( wxString::Format( "%s\"%s\":%g", (mCounts.back()>0)?", ":"", name,value));
|
||||
|
@ -82,7 +82,7 @@ void CommandMessageTarget::AddItem(const double value, const wxString &name){
|
|||
}
|
||||
|
||||
void CommandMessageTarget::StartField(const wxString &name){
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s", (mCounts.back()>0)? ", " : ""));
|
||||
else
|
||||
Update( wxString::Format( "%s\"%s\":", (mCounts.back()>0) ?", ":"", name));
|
||||
|
@ -137,21 +137,21 @@ void LispyCommandMessageTarget::EndStruct(){
|
|||
}
|
||||
void LispyCommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
||||
wxString Padding = "";
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%s\"%s\"", (mCounts.back()>0)?" ":"", Padding, Escaped(value)));
|
||||
else
|
||||
Update( wxString::Format( "%s%s(%s \"%s\")", (mCounts.back()>0)?" ":"", Padding, name, Escaped(value)));
|
||||
mCounts.back() += 1;
|
||||
}
|
||||
void LispyCommandMessageTarget::AddBool(const bool value, const wxString &name){
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%s", (mCounts.back()>0)?" ":"",value?"True":"False"));
|
||||
else
|
||||
Update( wxString::Format( "%s(%s %s)", (mCounts.back()>0)?" ":"", name,value?"True":"False"));
|
||||
mCounts.back() += 1;
|
||||
}
|
||||
void LispyCommandMessageTarget::AddItem(const double value, const wxString &name){
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%g", (mCounts.back()>0)?" ":"", value));
|
||||
else
|
||||
Update( wxString::Format( "%s(%s %g)", (mCounts.back()>0)?" ":"", name,value));
|
||||
|
|
|
@ -205,7 +205,7 @@ bool GetInfoCommand::SendCommands(const CommandContext &context, int flags )
|
|||
while (plug)
|
||||
{
|
||||
auto command = em.GetCommandIdentifier(plug->GetID());
|
||||
if (!command.IsEmpty()){
|
||||
if (!command.empty()){
|
||||
em.GetCommandDefinition( plug->GetID(), context, flags );
|
||||
}
|
||||
plug = pm.GetNextPlugin(PluginTypeEffect | PluginTypeAudacityCommand );
|
||||
|
@ -407,7 +407,7 @@ void GetInfoCommand::ExploreMenu( const CommandContext &context, wxMenu * pMenu,
|
|||
CommandManager * pMan = context.GetProject()->GetCommandManager();
|
||||
|
||||
wxMenuItemList list = pMenu->GetMenuItems();
|
||||
size_t lcnt = list.GetCount();
|
||||
size_t lcnt = list.size();
|
||||
wxMenuItem * item;
|
||||
wxString Label;
|
||||
wxString Accel;
|
||||
|
@ -435,7 +435,7 @@ void GetInfoCommand::ExploreMenu( const CommandContext &context, wxMenu * pMenu,
|
|||
context.AddItem( flags, "flags" );
|
||||
context.AddItem( Label, "label" );
|
||||
context.AddItem( Accel, "accel" );
|
||||
if( !Name.IsEmpty() )
|
||||
if( !Name.empty() )
|
||||
context.AddItem( Name, "id" );// It is called Scripting ID outside Audacity.
|
||||
context.EndStruct();
|
||||
|
||||
|
@ -572,7 +572,7 @@ void GetInfoCommand::ExploreWindows( const CommandContext &context,
|
|||
return;
|
||||
}
|
||||
wxWindowList list = pWin->GetChildren();
|
||||
size_t lcnt = list.GetCount();
|
||||
size_t lcnt = list.size();
|
||||
|
||||
for (size_t lndx = 0; lndx < lcnt; lndx++) {
|
||||
wxWindow * item = list[lndx];
|
||||
|
@ -587,7 +587,7 @@ void GetInfoCommand::ExploreWindows( const CommandContext &context,
|
|||
// Ignore anonymous panels.
|
||||
if( Name == "panel" )
|
||||
continue;
|
||||
if( Name.IsEmpty() )
|
||||
if( Name.empty() )
|
||||
Name = wxString("*") + item->GetToolTipText();
|
||||
|
||||
context.StartStruct();
|
||||
|
|
|
@ -39,7 +39,7 @@ void HelpCommand::PopulateOrExchange(ShuttleGui & S)
|
|||
bool HelpCommand::Apply(const CommandContext & context){
|
||||
EffectManager & em = EffectManager::Get();
|
||||
PluginID ID = em.GetEffectByIdentifier( mCommandName );
|
||||
if( ID.IsEmpty() )
|
||||
if( ID.empty() )
|
||||
context.Status( "Command not found" );
|
||||
else
|
||||
em.GetCommandDefinition( ID, context, 1);
|
||||
|
|
|
@ -166,7 +166,7 @@ BuiltinCommandsModule::BuiltinCommandsModule(ModuleManagerInterface *moduleManag
|
|||
|
||||
BuiltinCommandsModule::~BuiltinCommandsModule()
|
||||
{
|
||||
mPath.Clear();
|
||||
mPath.clear();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -209,13 +209,13 @@ bool BuiltinCommandsModule::Initialize()
|
|||
for (const auto &name : names)
|
||||
{
|
||||
//wxLogDebug("Adding %s", name );
|
||||
mNames.Add(wxString(BUILTIN_GENERIC_COMMAND_PREFIX) + name);
|
||||
mNames.push_back(wxString(BUILTIN_GENERIC_COMMAND_PREFIX) + name);
|
||||
}
|
||||
|
||||
/*
|
||||
for (size_t i = 0; i < WXSIZEOF(kExcludedNames); i++)
|
||||
{
|
||||
mNames.Add(wxString(BUILTIN_COMMAND_PREFIX) + kExcludedNames[i]);
|
||||
mNames.push_back(wxString(BUILTIN_COMMAND_PREFIX) + kExcludedNames[i]);
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ void OpenProjectCommand::PopulateOrExchange(ShuttleGui & S)
|
|||
bool OpenProjectCommand::Apply(const CommandContext & context){
|
||||
|
||||
wxString oldFileName = context.GetProject()->GetFileName();
|
||||
if(mFileName.IsEmpty())
|
||||
if(mFileName.empty())
|
||||
{
|
||||
auto project = context.GetProject();
|
||||
AudacityProject::OpenFiles(project);
|
||||
|
@ -83,7 +83,7 @@ void SaveProjectCommand::PopulateOrExchange(ShuttleGui & S)
|
|||
|
||||
bool SaveProjectCommand::Apply(const CommandContext &context)
|
||||
{
|
||||
if(mFileName.IsEmpty())
|
||||
if(mFileName.empty())
|
||||
return context.GetProject()->SaveAs(mbCompress);
|
||||
else
|
||||
return context.GetProject()->SaveAs(mFileName,mbCompress,mbAddToHistory);
|
||||
|
|
|
@ -348,7 +348,7 @@ void ExploreMenu(
|
|||
return;
|
||||
|
||||
wxMenuItemList list = pMenu->GetMenuItems();
|
||||
size_t lcnt = list.GetCount();
|
||||
size_t lcnt = list.size();
|
||||
wxMenuItem * item;
|
||||
wxString Label;
|
||||
wxString Accel;
|
||||
|
@ -603,7 +603,7 @@ void ScreenshotCommand::CaptureCommands(
|
|||
#endif
|
||||
mpShooter = this;
|
||||
|
||||
for( size_t i=0;i<Commands.GetCount();i++){
|
||||
for( size_t i=0;i<Commands.size();i++){
|
||||
// The handler is cleared each time it is used.
|
||||
SetIdleHandler( IdleHandler );
|
||||
Str = Commands[i];
|
||||
|
|
|
@ -98,7 +98,7 @@ private:
|
|||
public:
|
||||
void AddOption(const wxString &option)
|
||||
{
|
||||
mOptions.Add(option);
|
||||
mOptions.push_back(option);
|
||||
}
|
||||
void AddOptions(const wxArrayString &options)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
wxString GetDescription() const override
|
||||
{
|
||||
wxString desc = wxT("one of: ");
|
||||
int optionCount = mOptions.GetCount();
|
||||
int optionCount = mOptions.size();
|
||||
int i = 0;
|
||||
for (i = 0; i+1 < optionCount; ++i)
|
||||
{
|
||||
|
|
|
@ -250,7 +250,7 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S)
|
|||
|
||||
wxArrayString pitch;
|
||||
for (int ii = 0; ii < 12; ++ii)
|
||||
pitch.Add( PitchName( ii, PitchNameChoice::Both ) );
|
||||
pitch.push_back( PitchName( ii, PitchNameChoice::Both ) );
|
||||
|
||||
S.SetBorder(5);
|
||||
|
||||
|
|
|
@ -341,11 +341,11 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
|
|||
{
|
||||
if (i == kVinyl_NA)
|
||||
{
|
||||
vinylChoices.Add(wxGetTranslation(kVinylStrings[i]));
|
||||
vinylChoices.push_back(wxGetTranslation(kVinylStrings[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
vinylChoices.Add(kVinylStrings[i]);
|
||||
vinylChoices.push_back(kVinylStrings[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ wxArrayString EffectDistortion::GetFactoryPresets()
|
|||
|
||||
for (size_t i = 0; i < WXSIZEOF(FactoryPresets); i++)
|
||||
{
|
||||
names.Add(wxGetTranslation(FactoryPresets[i].name));
|
||||
names.push_back(wxGetTranslation(FactoryPresets[i].name));
|
||||
}
|
||||
|
||||
return names;
|
||||
|
|
|
@ -794,7 +794,7 @@ wxDialog *Effect::CreateUI(wxWindow *parent, EffectUIClientInterface *client)
|
|||
wxString Effect::GetUserPresetsGroup(const wxString & name)
|
||||
{
|
||||
wxString group = wxT("UserPresets");
|
||||
if (!name.IsEmpty())
|
||||
if (!name.empty())
|
||||
{
|
||||
group += wxCONFIG_PATH_SEPARATOR + name;
|
||||
}
|
||||
|
@ -1097,7 +1097,7 @@ wxArrayString Effect::GetUserPresets()
|
|||
|
||||
GetPrivateConfigSubgroups(GetUserPresetsGroup(wxEmptyString), presets);
|
||||
|
||||
presets.Sort();
|
||||
std::sort( presets.begin(), presets.end() );
|
||||
|
||||
return presets;
|
||||
}
|
||||
|
@ -1232,9 +1232,9 @@ bool Effect::DoEffect(wxWindow *parent,
|
|||
mF1 = selectedRegion->f1();
|
||||
wxArrayString Names;
|
||||
if( mF0 != SelectedRegion::UndefinedFrequency )
|
||||
Names.Add(wxT("control-f0"));
|
||||
Names.push_back(wxT("control-f0"));
|
||||
if( mF1 != SelectedRegion::UndefinedFrequency )
|
||||
Names.Add(wxT("control-f1"));
|
||||
Names.push_back(wxT("control-f1"));
|
||||
SetPresetParameters( &Names, NULL );
|
||||
|
||||
#endif
|
||||
|
@ -3125,7 +3125,7 @@ bool EffectUIHost::Initialize()
|
|||
}
|
||||
|
||||
long buttons;
|
||||
if ( mEffect && mEffect->ManualPage().IsEmpty() && mEffect->HelpPage().IsEmpty()) {
|
||||
if ( mEffect && mEffect->ManualPage().empty() && mEffect->HelpPage().empty()) {
|
||||
buttons = eApplyButton + eCloseButton;
|
||||
this->SetAcceleratorTable(wxNullAcceleratorTable);
|
||||
}
|
||||
|
@ -3317,7 +3317,7 @@ void EffectUIHost::OnCancel(wxCommandEvent & WXUNUSED(evt))
|
|||
|
||||
void EffectUIHost::OnHelp(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
if (mEffect && mEffect->GetFamilyId() == NYQUISTEFFECTS_FAMILY && (mEffect->ManualPage().IsEmpty())) {
|
||||
if (mEffect && mEffect->GetFamilyId() == NYQUISTEFFECTS_FAMILY && (mEffect->ManualPage().empty())) {
|
||||
// Old ShowHelp required when there is no on-line manual.
|
||||
// Always use default web browser to allow full-featured HTML pages.
|
||||
HelpSystem::ShowHelp(FindWindow(wxID_HELP), mEffect->HelpPage(), wxEmptyString, true, true);
|
||||
|
@ -3344,14 +3344,14 @@ void EffectUIHost::OnMenu(wxCommandEvent & WXUNUSED(evt))
|
|||
|
||||
LoadUserPresets();
|
||||
|
||||
if (mUserPresets.GetCount() == 0)
|
||||
if (mUserPresets.size() == 0)
|
||||
{
|
||||
menu.Append(kUserPresetsDummyID, _("User Presets"))->Enable(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto sub = std::make_unique<wxMenu>();
|
||||
for (size_t i = 0, cnt = mUserPresets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = mUserPresets.size(); i < cnt; i++)
|
||||
{
|
||||
sub->Append(kUserPresetsID + i, mUserPresets[i]);
|
||||
}
|
||||
|
@ -3360,14 +3360,14 @@ void EffectUIHost::OnMenu(wxCommandEvent & WXUNUSED(evt))
|
|||
|
||||
menu.Append(kSaveAsID, _("Save Preset..."));
|
||||
|
||||
if (mUserPresets.GetCount() == 0)
|
||||
if (mUserPresets.size() == 0)
|
||||
{
|
||||
menu.Append(kDeletePresetDummyID, _("Delete Preset"))->Enable(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto sub = std::make_unique<wxMenu>();
|
||||
for (size_t i = 0, cnt = mUserPresets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = mUserPresets.size(); i < cnt; i++)
|
||||
{
|
||||
sub->Append(kDeletePresetID + i, mUserPresets[i]);
|
||||
}
|
||||
|
@ -3381,13 +3381,13 @@ void EffectUIHost::OnMenu(wxCommandEvent & WXUNUSED(evt))
|
|||
{
|
||||
auto sub = std::make_unique<wxMenu>();
|
||||
sub->Append(kDefaultsID, _("Defaults"));
|
||||
if (factory.GetCount() > 0)
|
||||
if (factory.size() > 0)
|
||||
{
|
||||
sub->AppendSeparator();
|
||||
for (size_t i = 0, cnt = factory.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = factory.size(); i < cnt; i++)
|
||||
{
|
||||
wxString label = factory[i];
|
||||
if (label.IsEmpty())
|
||||
if (label.empty())
|
||||
{
|
||||
label = _("None");
|
||||
}
|
||||
|
@ -3669,7 +3669,7 @@ void EffectUIHost::OnSaveAs(wxCommandEvent & WXUNUSED(evt))
|
|||
}
|
||||
|
||||
name = text->GetValue();
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
AudacityMessageDialog md(this,
|
||||
_("You must specify a name"),
|
||||
|
@ -3852,12 +3852,12 @@ void EffectUIHost::UpdateControls()
|
|||
|
||||
void EffectUIHost::LoadUserPresets()
|
||||
{
|
||||
mUserPresets.Clear();
|
||||
mUserPresets.clear();
|
||||
|
||||
if( mEffect )
|
||||
mEffect->GetPrivateConfigSubgroups(mEffect->GetUserPresetsGroup(wxEmptyString), mUserPresets);
|
||||
|
||||
mUserPresets.Sort();
|
||||
std::sort( mUserPresets.begin(), mUserPresets.end() );
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -3935,12 +3935,12 @@ EffectPresetsDialog::EffectPresetsDialog(wxWindow *parent, Effect *effect)
|
|||
mUserPresets = effect->GetUserPresets();
|
||||
mFactoryPresets = effect->GetFactoryPresets();
|
||||
|
||||
if (mUserPresets.GetCount() > 0)
|
||||
if (mUserPresets.size() > 0)
|
||||
{
|
||||
mType->Append(_("User Presets"));
|
||||
}
|
||||
|
||||
if (mFactoryPresets.GetCount() > 0)
|
||||
if (mFactoryPresets.size() > 0)
|
||||
{
|
||||
mType->Append(_("Factory Presets"));
|
||||
}
|
||||
|
@ -4009,10 +4009,10 @@ void EffectPresetsDialog::SetPrefix(const wxString & type, const wxString & pref
|
|||
else if (type.IsSameAs(_("Factory Presets")))
|
||||
{
|
||||
mPresets->Clear();
|
||||
for (size_t i = 0, cnt = mFactoryPresets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = mFactoryPresets.size(); i < cnt; i++)
|
||||
{
|
||||
wxString label = mFactoryPresets[i];
|
||||
if (label.IsEmpty())
|
||||
if (label.empty())
|
||||
{
|
||||
label = _("None");
|
||||
}
|
||||
|
@ -4073,10 +4073,10 @@ void EffectPresetsDialog::UpdateUI()
|
|||
}
|
||||
|
||||
mPresets->Clear();
|
||||
for (size_t i = 0, cnt = mFactoryPresets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = mFactoryPresets.size(); i < cnt; i++)
|
||||
{
|
||||
wxString label = mFactoryPresets[i];
|
||||
if (label.IsEmpty())
|
||||
if (label.empty())
|
||||
{
|
||||
label = _("None");
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ wxString EffectManager::GetEffectParameters(const PluginID & ID)
|
|||
|
||||
// Some effects don't have automatable parameters and will not return
|
||||
// anything, so try to get the active preset (current or factory).
|
||||
if (parms.IsEmpty())
|
||||
if (parms.empty())
|
||||
{
|
||||
parms = GetDefaultPreset(ID);
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ wxString EffectManager::GetEffectParameters(const PluginID & ID)
|
|||
|
||||
// Some effects don't have automatable parameters and will not return
|
||||
// anything, so try to get the active preset (current or factory).
|
||||
if (parms.IsEmpty())
|
||||
if (parms.empty())
|
||||
{
|
||||
parms = GetDefaultPreset(ID);
|
||||
}
|
||||
|
@ -400,8 +400,8 @@ bool EffectManager::HasPresets(const PluginID & ID)
|
|||
return false;
|
||||
}
|
||||
|
||||
return effect->GetUserPresets().GetCount() > 0 ||
|
||||
effect->GetFactoryPresets().GetCount() > 0 ||
|
||||
return effect->GetUserPresets().size() > 0 ||
|
||||
effect->GetFactoryPresets().size() > 0 ||
|
||||
effect->HasCurrentSettings() ||
|
||||
effect->HasFactoryDefaults();
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ wxString EffectManager::GetPreset(const PluginID & ID, const wxString & params,
|
|||
}
|
||||
|
||||
preset = effect->GetPreset(parent, preset);
|
||||
if (preset.IsEmpty())
|
||||
if (preset.empty())
|
||||
{
|
||||
return preset;
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ wxString EffectManager::GetDefaultPreset(const PluginID & ID)
|
|||
preset = Effect::kFactoryDefaultsIdent;
|
||||
}
|
||||
|
||||
if (!preset.IsEmpty())
|
||||
if (!preset.empty())
|
||||
{
|
||||
CommandParameters eap;
|
||||
|
||||
|
@ -838,7 +838,7 @@ int EffectManager::GetRealtimeLatency()
|
|||
Effect *EffectManager::GetEffect(const PluginID & ID)
|
||||
{
|
||||
// Must have a "valid" ID
|
||||
if (ID.IsEmpty())
|
||||
if (ID.empty())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -890,7 +890,7 @@ Effect *EffectManager::GetEffect(const PluginID & ID)
|
|||
AudacityCommand *EffectManager::GetAudacityCommand(const PluginID & ID)
|
||||
{
|
||||
// Must have a "valid" ID
|
||||
if (ID.IsEmpty())
|
||||
if (ID.empty())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -833,7 +833,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||
wxArrayString curves;
|
||||
for (size_t i = 0, cnt = mCurves.size(); i < cnt; i++)
|
||||
{
|
||||
curves.Add(mCurves[ i ].Name);
|
||||
curves.push_back(mCurves[ i ].Name);
|
||||
}
|
||||
|
||||
mCurve = S.Id(ID_Curve).AddChoice( {}, wxT(""), &curves);
|
||||
|
@ -3444,7 +3444,7 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
|
|||
}
|
||||
|
||||
if(highlight == -1)
|
||||
PopulateList(mEditCurves.GetCount()-1); // set 'unnamed' as the selected curve
|
||||
PopulateList(mEditCurves.size()-1); // set 'unnamed' as the selected curve
|
||||
else
|
||||
PopulateList(highlight); // user said 'No' to deletion
|
||||
#else // 'DELETE all N' code
|
||||
|
@ -3656,7 +3656,7 @@ wxAccStatus SliderAx::GetChildCount(int* childCount)
|
|||
// a document has a default action of "Press" rather than "Prints the current document."
|
||||
wxAccStatus SliderAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionName )
|
||||
{
|
||||
actionName->Clear();
|
||||
actionName->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -3664,7 +3664,7 @@ wxAccStatus SliderAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionN
|
|||
// Returns the description for this object or a child.
|
||||
wxAccStatus SliderAx::GetDescription( int WXUNUSED(childId), wxString *description )
|
||||
{
|
||||
description->Clear();
|
||||
description->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -3684,7 +3684,7 @@ wxAccStatus SliderAx::GetFocus(int* childId, wxAccessible** child)
|
|||
// Returns help text for this object or a child, similar to tooltip text.
|
||||
wxAccStatus SliderAx::GetHelpText( int WXUNUSED(childId), wxString *helpText )
|
||||
{
|
||||
helpText->Clear();
|
||||
helpText->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -3693,7 +3693,7 @@ wxAccStatus SliderAx::GetHelpText( int WXUNUSED(childId), wxString *helpText )
|
|||
// Return e.g. ALT+K
|
||||
wxAccStatus SliderAx::GetKeyboardShortcut( int WXUNUSED(childId), wxString *shortcut )
|
||||
{
|
||||
shortcut->Clear();
|
||||
shortcut->clear();
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
|
|
@ -348,7 +348,7 @@ bool EffectEqualization48x::TrackCompare()
|
|||
auto o = aTrack->Duplicate();
|
||||
SecondIMap.push_back(aTrack);
|
||||
SecondIMap.push_back(o.get());
|
||||
SecondOutputTracks.Add(std::move(o));
|
||||
SecondOutputTracks.push_back(std::move(o));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ BuiltinEffectsModule::BuiltinEffectsModule(ModuleManagerInterface *moduleManager
|
|||
|
||||
BuiltinEffectsModule::~BuiltinEffectsModule()
|
||||
{
|
||||
mPath.Clear();
|
||||
mPath.clear();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -271,13 +271,13 @@ bool BuiltinEffectsModule::Initialize()
|
|||
const auto &names = kEffectNames();
|
||||
for (const auto &name : names)
|
||||
{
|
||||
mNames.Add(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
||||
mNames.push_back(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
||||
}
|
||||
|
||||
const auto &excluded = kExcludedNames();
|
||||
for (const auto &name : excluded)
|
||||
{
|
||||
mNames.Add(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
||||
mNames.push_back(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1751,7 +1751,7 @@ void EffectNoiseReduction::Dialog::PopulateOrExchange(ShuttleGui & S)
|
|||
{
|
||||
wxArrayString windowTypeChoices;
|
||||
for (int ii = 0; ii < WT_N_WINDOW_TYPES; ++ii)
|
||||
windowTypeChoices.Add(windowTypesInfo[ii].name);
|
||||
windowTypeChoices.push_back(windowTypesInfo[ii].name);
|
||||
S.TieChoice(_("&Window types") + wxString(wxT(":")),
|
||||
mTempSettings.mWindowTypes,
|
||||
&windowTypeChoices);
|
||||
|
@ -1797,7 +1797,7 @@ void EffectNoiseReduction::Dialog::PopulateOrExchange(ShuttleGui & S)
|
|||
--nn;
|
||||
#endif
|
||||
for (int ii = 0; ii < nn; ++ii)
|
||||
methodChoices.Add(discriminationMethodInfo[ii].name);
|
||||
methodChoices.push_back(discriminationMethodInfo[ii].name);
|
||||
S.TieChoice(_("Discrimination &method") + wxString(wxT(":")),
|
||||
mTempSettings.mMethod,
|
||||
&methodChoices);
|
||||
|
|
|
@ -332,7 +332,7 @@ wxArrayString EffectReverb::GetFactoryPresets()
|
|||
|
||||
for (size_t i = 0; i < WXSIZEOF(FactoryPresets); i++)
|
||||
{
|
||||
names.Add(wxGetTranslation(FactoryPresets[i].name));
|
||||
names.push_back(wxGetTranslation(FactoryPresets[i].name));
|
||||
}
|
||||
|
||||
return names;
|
||||
|
@ -410,7 +410,7 @@ bool EffectReverb::Startup()
|
|||
gPrefs->Read(path + wxT("WetOnly"), &mParams.mWetOnly, DEF_WetOnly);
|
||||
gPrefs->Read(path + wxT("name"), &name, wxEmptyString);
|
||||
|
||||
if (!name.IsEmpty())
|
||||
if (!name.empty())
|
||||
{
|
||||
name.Prepend(wxT(" - "));
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ void EffectReverb::SetTitle(const wxString & name)
|
|||
{
|
||||
wxString title(_("Reverb"));
|
||||
|
||||
if (!name.IsEmpty())
|
||||
if (!name.empty())
|
||||
{
|
||||
title += wxT(": ") + name;
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
|||
wxArrayString orders;
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
orders.Add(wxString::Format(wxT("%d"), i));
|
||||
orders.push_back(wxString::Format(wxT("%d"), i));
|
||||
}
|
||||
/*i18n-hint: 'Order' means the complexity of the filter, and is a number between 1 and 10.*/
|
||||
mFilterOrderCtl = S.Id(ID_Order).AddChoice(_("O&rder:"), wxT(""), &orders);
|
||||
|
|
|
@ -396,7 +396,7 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
wxStringTokenizer tok(vstpath);
|
||||
while (tok.HasMoreTokens())
|
||||
{
|
||||
pathList.Add(tok.GetNextToken());
|
||||
pathList.push_back(tok.GetNextToken());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,15 +404,15 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
#define VSTPATH wxT("/Library/Audio/Plug-Ins/VST")
|
||||
|
||||
// Look in ~/Library/Audio/Plug-Ins/VST and /Library/Audio/Plug-Ins/VST
|
||||
pathList.Add(wxGetHomeDir() + wxFILE_SEP_PATH + VSTPATH);
|
||||
pathList.Add(VSTPATH);
|
||||
pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + VSTPATH);
|
||||
pathList.push_back(VSTPATH);
|
||||
|
||||
// Recursively search all paths for Info.plist files. This will identify all
|
||||
// bundles.
|
||||
pm.FindFilesInPathList(wxT("Info.plist"), pathList, files, true);
|
||||
|
||||
// Remove the 'Contents/Info.plist' portion of the names
|
||||
for (size_t i = 0; i < files.GetCount(); i++)
|
||||
for (size_t i = 0; i < files.size(); i++)
|
||||
{
|
||||
files[i] = wxPathOnly(wxPathOnly(files[i]));
|
||||
if (!files[i].EndsWith(wxT(".vst")))
|
||||
|
@ -441,7 +441,7 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
tpath[len] = 0;
|
||||
dpath[0] = 0;
|
||||
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
||||
pathList.Add(dpath);
|
||||
pathList.push_back(dpath);
|
||||
}
|
||||
|
||||
// Then try HKEY_LOCAL_MACHINE registry key
|
||||
|
@ -458,7 +458,7 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
tpath[len] = 0;
|
||||
dpath[0] = 0;
|
||||
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
||||
pathList.Add(dpath);
|
||||
pathList.push_back(dpath);
|
||||
}
|
||||
|
||||
// Add the default path last
|
||||
|
@ -466,7 +466,7 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
ExpandEnvironmentStrings(wxT("%ProgramFiles%\\Steinberg\\VSTPlugins"),
|
||||
dpath,
|
||||
WXSIZEOF(dpath));
|
||||
pathList.Add(dpath);
|
||||
pathList.push_back(dpath);
|
||||
|
||||
// Recursively scan for all DLLs
|
||||
pm.FindFilesInPathList(wxT("*.dll"), pathList, files, true);
|
||||
|
@ -474,15 +474,15 @@ wxArrayString VSTEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
#else
|
||||
|
||||
// Nothing specified in the VST_PATH environment variable...provide defaults
|
||||
if (vstpath.IsEmpty())
|
||||
if (vstpath.empty())
|
||||
{
|
||||
// We add this "non-default" one
|
||||
pathList.Add(wxT(LIBDIR) wxT("/vst"));
|
||||
pathList.push_back(wxT(LIBDIR) wxT("/vst"));
|
||||
|
||||
// These are the defaults used by other hosts
|
||||
pathList.Add(wxT("/usr/lib/vst"));
|
||||
pathList.Add(wxT("/usr/local/lib/vst"));
|
||||
pathList.Add(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".vst"));
|
||||
pathList.push_back(wxT("/usr/lib/vst"));
|
||||
pathList.push_back(wxT("/usr/local/lib/vst"));
|
||||
pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".vst"));
|
||||
}
|
||||
|
||||
// Recursively scan for all shared objects
|
||||
|
@ -1633,7 +1633,7 @@ bool VSTEffect::GetAutomationParameters(CommandParameters & parms)
|
|||
for (int i = 0; i < mAEffect->numParams; i++)
|
||||
{
|
||||
wxString name = GetString(effGetParamName, i);
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
name.Printf(wxT("parm_%d"), i);
|
||||
}
|
||||
|
@ -1654,7 +1654,7 @@ bool VSTEffect::SetAutomationParameters(CommandParameters & parms)
|
|||
for (int i = 0; i < mAEffect->numParams; i++)
|
||||
{
|
||||
wxString name = GetString(effGetParamName, i);
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
name.Printf(wxT("parm_%d"), i);
|
||||
}
|
||||
|
@ -1706,7 +1706,7 @@ wxArrayString VSTEffect::GetFactoryPresets()
|
|||
{
|
||||
for (int i = 0; i < mAEffect->numPrograms; i++)
|
||||
{
|
||||
progs.Add(GetString(effGetProgramNameIndexed, i));
|
||||
progs.push_back(GetString(effGetProgramNameIndexed, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1854,7 +1854,7 @@ void VSTEffect::ExportPresets()
|
|||
NULL);
|
||||
|
||||
// User canceled...
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1906,7 +1906,7 @@ void VSTEffect::ImportPresets()
|
|||
mParent);
|
||||
|
||||
// User canceled...
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2976,7 +2976,7 @@ void VSTEffect::RefreshParameters(int skip)
|
|||
name = text;
|
||||
|
||||
text = GetString(effGetParamDisplay, i);
|
||||
if (text.IsEmpty())
|
||||
if (text.empty())
|
||||
{
|
||||
text.Printf(wxT("%.5g"),callGetParameter(i));
|
||||
}
|
||||
|
@ -2984,7 +2984,7 @@ void VSTEffect::RefreshParameters(int skip)
|
|||
name += wxT(' ') + text;
|
||||
|
||||
text = GetString(effGetParamDisplay, i);
|
||||
if (!text.IsEmpty())
|
||||
if (!text.empty())
|
||||
{
|
||||
text.Printf(wxT("%-8s"), GetString(effGetParamLabel, i));
|
||||
mLabels[i]->SetLabel(wxString::Format(wxT("%8s"), text));
|
||||
|
|
|
@ -99,7 +99,7 @@ AudioUnitEffectsModule::AudioUnitEffectsModule(ModuleManagerInterface *moduleMan
|
|||
|
||||
AudioUnitEffectsModule::~AudioUnitEffectsModule()
|
||||
{
|
||||
mPath.Clear();
|
||||
mPath.clear();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -266,7 +266,7 @@ void AudioUnitEffectsModule::LoadAudioUnitsOfType(OSType inAUType,
|
|||
{
|
||||
wxString name = wxCFStringRef::AsString(cfName);
|
||||
|
||||
effects.Add(wxString::Format(wxT("%-4.4s/%-4.4s/%-4.4s/%s"),
|
||||
effects.push_back(wxString::Format(wxT("%-4.4s/%-4.4s/%-4.4s/%s"),
|
||||
FromOSType(found.componentManufacturer),
|
||||
FromOSType(found.componentType),
|
||||
FromOSType(found.componentSubType),
|
||||
|
@ -354,9 +354,9 @@ AudioUnitEffectOptionsDialog::AudioUnitEffectOptionsDialog(wxWindow * parent, Ef
|
|||
{
|
||||
mHost = host;
|
||||
|
||||
mUITypes.Add(_("Full"));
|
||||
mUITypes.Add(_("Generic"));
|
||||
mUITypes.Add(_("Basic"));
|
||||
mUITypes.push_back(_("Full"));
|
||||
mUITypes.push_back(_("Generic"));
|
||||
mUITypes.push_back(_("Basic"));
|
||||
|
||||
mHost->GetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency, true);
|
||||
mHost->GetSharedConfig(wxT("Options"), wxT("UIType"), mUIType, wxT("Full"));
|
||||
|
@ -526,9 +526,9 @@ void AudioUnitEffectExportDialog::PopulateOrExchange(ShuttleGui & S)
|
|||
|
||||
mEffect->mHost->GetPrivateConfigSubgroups(mEffect->mHost->GetUserPresetsGroup(wxEmptyString), presets);
|
||||
|
||||
presets.Sort();
|
||||
std::sort( presets.begin(), presets.end() );
|
||||
|
||||
for (size_t i = 0, cnt = presets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = presets.size(); i < cnt; i++)
|
||||
{
|
||||
mList->InsertItem(i, presets[i]);
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ void AudioUnitEffectImportDialog::PopulateOrExchange(ShuttleGui & S)
|
|||
|
||||
presets.Sort();
|
||||
|
||||
for (size_t i = 0, cnt = presets.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = presets.size(); i < cnt; i++)
|
||||
{
|
||||
fn = presets[i];
|
||||
mList->InsertItem(i, fn.GetName());
|
||||
|
@ -1515,7 +1515,7 @@ bool AudioUnitEffect::GetAutomationParameters(CommandParameters & parms)
|
|||
name = wxCFStringRef::AsString(info.cfNameString);
|
||||
}
|
||||
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1588,7 +1588,7 @@ bool AudioUnitEffect::SetAutomationParameters(CommandParameters & parms)
|
|||
name = wxCFStringRef::AsString(info.cfNameString);
|
||||
}
|
||||
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1703,7 +1703,7 @@ wxArrayString AudioUnitEffect::GetFactoryPresets()
|
|||
for (CFIndex i = 0, cnt = CFArrayGetCount(array); i < cnt; i++)
|
||||
{
|
||||
AUPreset *preset = (AUPreset *) CFArrayGetValueAtIndex(array, i);
|
||||
presets.Add(wxCFStringRef::AsString(preset->presetName));
|
||||
presets.push_back(wxCFStringRef::AsString(preset->presetName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,9 +196,9 @@ bool LadspaEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
|||
|
||||
for (int i = 0; i < (int)WXSIZEOF(kShippedEffects); i++)
|
||||
{
|
||||
files.Clear();
|
||||
files.clear();
|
||||
pm.FindFilesInPathList(kShippedEffects[i], pathList, files);
|
||||
for (size_t j = 0, cnt = files.GetCount(); j < cnt; j++)
|
||||
for (size_t j = 0, cnt = files.size(); j < cnt; j++)
|
||||
{
|
||||
if (!pm.IsPluginRegistered(files[j]))
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ wxArrayString LadspaEffectsModule::GetSearchPaths()
|
|||
wxStringTokenizer tok(pathVar);
|
||||
while (tok.HasMoreTokens())
|
||||
{
|
||||
pathList.Add(tok.GetNextToken());
|
||||
pathList.push_back(tok.GetNextToken());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,8 +350,8 @@ wxArrayString LadspaEffectsModule::GetSearchPaths()
|
|||
#define LADSPAPATH wxT("/Library/Audio/Plug-Ins/LADSPA")
|
||||
|
||||
// Look in ~/Library/Audio/Plug-Ins/LADSPA and /Library/Audio/Plug-Ins/LADSPA
|
||||
pathList.Add(wxGetHomeDir() + wxFILE_SEP_PATH + LADSPAPATH);
|
||||
pathList.Add(LADSPAPATH);
|
||||
pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + LADSPAPATH);
|
||||
pathList.push_back(LADSPAPATH);
|
||||
|
||||
#elif defined(__WXMSW__)
|
||||
|
||||
|
@ -359,10 +359,10 @@ wxArrayString LadspaEffectsModule::GetSearchPaths()
|
|||
|
||||
#else
|
||||
|
||||
pathList.Add(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".ladspa"));
|
||||
pathList.Add(wxT("/usr/local/lib/ladspa"));
|
||||
pathList.Add(wxT("/usr/lib/ladspa"));
|
||||
pathList.Add(wxT(LIBDIR) wxT("/ladspa"));
|
||||
pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".ladspa"));
|
||||
pathList.push_back(wxT("/usr/local/lib/ladspa"));
|
||||
pathList.push_back(wxT("/usr/lib/ladspa"));
|
||||
pathList.push_back(wxT(LIBDIR) wxT("/ladspa"));
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ ComponentInterfaceSymbol LV2Effect::GetVendor()
|
|||
{
|
||||
wxString vendor = LilvString(lilv_plugin_get_author_name(mPlug), true);
|
||||
|
||||
if (vendor.IsEmpty())
|
||||
if (vendor.empty())
|
||||
{
|
||||
vendor = XO("n/a");
|
||||
}
|
||||
|
@ -493,12 +493,12 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
|||
if (group)
|
||||
{
|
||||
ctrl.mGroup = LilvString(lilv_world_get(gWorld, group, gLabel, NULL));
|
||||
if (ctrl.mGroup.IsEmpty())
|
||||
if (ctrl.mGroup.empty())
|
||||
{
|
||||
ctrl.mGroup = LilvString(lilv_world_get(gWorld, group, gName, NULL));
|
||||
}
|
||||
|
||||
if (ctrl.mGroup.IsEmpty())
|
||||
if (ctrl.mGroup.empty())
|
||||
{
|
||||
ctrl.mGroup = LilvString(group);
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
|||
// Add it if not previously done
|
||||
if (mGroups.Index(ctrl.mGroup) == wxNOT_FOUND)
|
||||
{
|
||||
mGroups.Add(ctrl.mGroup);
|
||||
mGroups.push_back(ctrl.mGroup);
|
||||
}
|
||||
|
||||
// Get the scale points
|
||||
|
@ -517,7 +517,7 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
|||
const LilvScalePoint *point = lilv_scale_points_get(points, j);
|
||||
|
||||
ctrl.mScaleValues.push_back(lilv_node_as_float(lilv_scale_point_get_value(point)));
|
||||
ctrl.mScaleLabels.Add(LilvString(lilv_scale_point_get_label(point)));
|
||||
ctrl.mScaleLabels.push_back(LilvString(lilv_scale_point_get_label(point)));
|
||||
}
|
||||
lilv_scale_points_free(points);
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ wxArrayString LV2Effect::GetFactoryPresets()
|
|||
{
|
||||
const LilvNode *preset = lilv_nodes_get(presets, i);
|
||||
|
||||
mFactoryPresetUris.Add(LilvString(preset));
|
||||
mFactoryPresetUris.push_back(LilvString(preset));
|
||||
|
||||
lilv_world_load_resource(gWorld, preset);
|
||||
|
||||
|
@ -1156,13 +1156,13 @@ wxArrayString LV2Effect::GetFactoryPresets()
|
|||
{
|
||||
const LilvNode *label = lilv_nodes_get_first(labels);
|
||||
|
||||
mFactoryPresetNames.Add(LilvString(label));
|
||||
mFactoryPresetNames.push_back(LilvString(label));
|
||||
|
||||
lilv_nodes_free(labels);
|
||||
}
|
||||
else
|
||||
{
|
||||
mFactoryPresetNames.Add(LilvString(preset).AfterLast(wxT('#')));
|
||||
mFactoryPresetNames.push_back(LilvString(preset).AfterLast(wxT('#')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1176,7 +1176,7 @@ wxArrayString LV2Effect::GetFactoryPresets()
|
|||
|
||||
bool LV2Effect::LoadFactoryPreset(int id)
|
||||
{
|
||||
if (id < 0 || id >= (int) mFactoryPresetUris.GetCount())
|
||||
if (id < 0 || id >= (int) mFactoryPresetUris.size())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1570,12 +1570,12 @@ bool LV2Effect::BuildPlain()
|
|||
innerSizer->Add(groupSizer.release(), 0, wxEXPAND | wxALL, 5);
|
||||
}
|
||||
|
||||
mGroups.Sort();
|
||||
std::sort( mGroups.begin(), mGroups.end() );
|
||||
|
||||
for (size_t i = 0, groupCount = mGroups.GetCount(); i < groupCount; i++)
|
||||
for (size_t i = 0, groupCount = mGroups.size(); i < groupCount; i++)
|
||||
{
|
||||
wxString label = mGroups[i];
|
||||
if (label.IsEmpty())
|
||||
if (label.empty())
|
||||
{
|
||||
label = _("Effect Settings");
|
||||
}
|
||||
|
@ -1590,7 +1590,7 @@ bool LV2Effect::BuildPlain()
|
|||
int p = params[pi];
|
||||
LV2Port & ctrl = mControls[p];
|
||||
wxString labelText = ctrl.mName;
|
||||
if (!ctrl.mUnits.IsEmpty())
|
||||
if (!ctrl.mUnits.empty())
|
||||
{
|
||||
labelText += wxT(" (") + ctrl.mUnits + wxT(")");
|
||||
}
|
||||
|
@ -1838,7 +1838,7 @@ bool LV2Effect::TransferDataToWindow()
|
|||
return true;
|
||||
}
|
||||
|
||||
for (size_t i = 0, groupCount = mGroups.GetCount(); i < groupCount; i++)
|
||||
for (size_t i = 0, groupCount = mGroups.size(); i < groupCount; i++)
|
||||
{
|
||||
const auto & params = mGroupMap[mGroups[i]];
|
||||
for (size_t pi = 0, ParamCount = params.size(); pi < ParamCount; pi++)
|
||||
|
|
|
@ -181,7 +181,7 @@ bool LV2EffectsModule::Initialize()
|
|||
wxString pathVar;
|
||||
wxGetEnv(wxT("LV2_PATH"), &pathVar);
|
||||
|
||||
if (pathVar.IsEmpty())
|
||||
if (pathVar.empty())
|
||||
{
|
||||
pathVar = newVar.Mid(1);
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ wxArrayString LV2EffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUSE
|
|||
continue;
|
||||
}
|
||||
|
||||
plugins.Add(LilvString(lilv_plugin_get_uri(plug)));
|
||||
plugins.push_back(LilvString(lilv_plugin_get_uri(plug)));
|
||||
}
|
||||
|
||||
return plugins;
|
||||
|
|
|
@ -89,7 +89,7 @@ NyquistEffectsModule::NyquistEffectsModule(ModuleManagerInterface *moduleManager
|
|||
|
||||
NyquistEffectsModule::~NyquistEffectsModule()
|
||||
{
|
||||
mPath.Clear();
|
||||
mPath.clear();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -130,7 +130,7 @@ bool NyquistEffectsModule::Initialize()
|
|||
{
|
||||
wxArrayString audacityPathList = wxGetApp().audacityPathList;
|
||||
|
||||
for (size_t i = 0, cnt = audacityPathList.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = audacityPathList.size(); i < cnt; i++)
|
||||
{
|
||||
wxFileName name(audacityPathList[i], wxT(""));
|
||||
name.AppendDir(wxT("nyquist"));
|
||||
|
@ -184,9 +184,9 @@ bool NyquistEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
|||
|
||||
for (size_t i = 0; i < WXSIZEOF(kShippedEffects); i++)
|
||||
{
|
||||
files.Clear();
|
||||
files.clear();
|
||||
pm.FindFilesInPathList(kShippedEffects[i], pathList, files);
|
||||
for (size_t j = 0, cnt = files.GetCount(); j < cnt; j++)
|
||||
for (size_t j = 0, cnt = files.size(); j < cnt; j++)
|
||||
{
|
||||
if (!pm.IsPluginRegistered(files[j]))
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ wxArrayString NyquistEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
|||
wxArrayString files;
|
||||
|
||||
// Add the Nyquist prompt
|
||||
files.Add(NYQUIST_PROMPT_ID);
|
||||
files.push_back(NYQUIST_PROMPT_ID);
|
||||
|
||||
// Load .ny plug-ins
|
||||
pm.FindFilesInPathList(wxT("*.ny"), pathList, files);
|
||||
|
|
|
@ -238,7 +238,7 @@ wxString NyquistEffect::HelpPage()
|
|||
wxArrayString paths = NyquistEffect::GetNyquistSearchPath();
|
||||
wxString fileName;
|
||||
|
||||
for (size_t i = 0, cnt = paths.GetCount(); i < cnt; i++) {
|
||||
for (size_t i = 0, cnt = paths.size(); i < cnt; i++) {
|
||||
fileName = wxFileName(paths[i] + wxT("/") + mHelpFile).GetFullPath();
|
||||
if (wxFileExists(fileName)) {
|
||||
mHelpFileExists = true;
|
||||
|
@ -636,8 +636,8 @@ bool NyquistEffect::Process()
|
|||
? 0
|
||||
: mOutputTracks->Selected< const WaveTrack >().size();
|
||||
|
||||
mDebugOutput.Clear();
|
||||
if (!mHelpFile.IsEmpty() && !mHelpFileExists) {
|
||||
mDebugOutput.clear();
|
||||
if (!mHelpFile.empty() && !mHelpFileExists) {
|
||||
mDebugOutput = wxString::Format(_("error: File \"%s\" specified in header but not found in plug-in path.\n"), mHelpFile);
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ bool NyquistEffect::Process()
|
|||
|
||||
wxArrayString paths = NyquistEffect::GetNyquistSearchPath();
|
||||
wxString list;
|
||||
for (size_t i = 0, cnt = paths.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = paths.size(); i < cnt; i++)
|
||||
{
|
||||
list += wxT("\"") + EscapeString(paths[i]) + wxT("\" ");
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ bool NyquistEffect::Process()
|
|||
finish:
|
||||
|
||||
// Show debug window if trace set in plug-in header and something to show.
|
||||
mDebug = (mTrace && !mDebugOutput.IsEmpty())? true : mDebug;
|
||||
mDebug = (mTrace && !mDebugOutput.empty())? true : mDebug;
|
||||
|
||||
if (mDebug && !mRedirectOutput) {
|
||||
NyquistOutputDialog dlog(mUIParent, -1,
|
||||
|
@ -1302,7 +1302,7 @@ bool NyquistEffect::ProcessOne()
|
|||
rval = nyx_eval_expression(cmd.mb_str(wxConvUTF8));
|
||||
|
||||
// If we're not showing debug window, log errors and warnings:
|
||||
if (!mDebugOutput.IsEmpty() && !mDebug && !mTrace) {
|
||||
if (!mDebugOutput.empty() && !mDebug && !mTrace) {
|
||||
/* i18n-hint: An effect "returned" a message.*/
|
||||
wxLogMessage(_("\'%s\' returned:\n%s"), mName, mDebugOutput);
|
||||
}
|
||||
|
@ -1340,7 +1340,7 @@ bool NyquistEffect::ProcessOne()
|
|||
if (mTrace) {
|
||||
/* i18n-hint: "%s" is replaced by name of plug-in.*/
|
||||
mDebugOutput = wxString::Format(_("nyx_error returned from %s.\n"),
|
||||
mName.IsEmpty()? _("plug-in") : mName) + mDebugOutput;
|
||||
mName.empty()? _("plug-in") : mName) + mDebugOutput;
|
||||
mDebug = true;
|
||||
}
|
||||
else {
|
||||
|
@ -1351,7 +1351,7 @@ bool NyquistEffect::ProcessOne()
|
|||
|
||||
if (rval == nyx_string) {
|
||||
wxString msg = NyquistToWxString(nyx_get_string());
|
||||
if (!msg.IsEmpty()) // Empty string may be used as a No-Op return value.
|
||||
if (!msg.empty()) // Empty string may be used as a No-Op return value.
|
||||
Effect::MessageBox(msg);
|
||||
else
|
||||
return true;
|
||||
|
@ -1511,7 +1511,7 @@ bool NyquistEffect::ProcessOne()
|
|||
wxString NyquistEffect::NyquistToWxString(const char *nyqString)
|
||||
{
|
||||
wxString str(nyqString, wxConvUTF8);
|
||||
if (nyqString != NULL && nyqString[0] && str.IsEmpty()) {
|
||||
if (nyqString != NULL && nyqString[0] && str.empty()) {
|
||||
// invalid UTF-8 string, convert as Latin-1
|
||||
str = _("[Warning: Nyquist returned invalid UTF-8 string, converted here as Latin-1]");
|
||||
// TODO: internationalization of strings from Nyquist effects, at least
|
||||
|
@ -2080,8 +2080,8 @@ bool NyquistEffect::Parse(
|
|||
|
||||
// Deprecated
|
||||
if (len >= 2 && tokens[0] == wxT("categories")) {
|
||||
for (size_t i = 1; i < tokens.GetCount(); ++i) {
|
||||
mCategories.Add(tokens[i]);
|
||||
for (size_t i = 1; i < tokens.size(); ++i) {
|
||||
mCategories.push_back(tokens[i]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -2100,7 +2100,7 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream)
|
|||
mCmd = wxT("");
|
||||
mIsSal = false;
|
||||
mControls.clear();
|
||||
mCategories.Clear();
|
||||
mCategories.clear();
|
||||
mIsSpectral = false;
|
||||
mManPage = wxEmptyString; // If not wxEmptyString, must be a page in the Audacity manual.
|
||||
mHelpFile = wxEmptyString; // If not wxEmptyString, must be a valid HTML help file.
|
||||
|
@ -2346,14 +2346,14 @@ wxArrayString NyquistEffect::GetNyquistSearchPath()
|
|||
wxArrayString audacityPathList = wxGetApp().audacityPathList;
|
||||
wxArrayString pathList;
|
||||
|
||||
for (size_t i = 0; i < audacityPathList.GetCount(); i++)
|
||||
for (size_t i = 0; i < audacityPathList.size(); i++)
|
||||
{
|
||||
wxString prefix = audacityPathList[i] + wxFILE_SEP_PATH;
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("nyquist"), pathList);
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("plugins"), pathList);
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("plug-ins"), pathList);
|
||||
}
|
||||
pathList.Add(FileNames::PlugInDir());
|
||||
pathList.push_back(FileNames::PlugInDir());
|
||||
|
||||
return pathList;
|
||||
}
|
||||
|
@ -2707,7 +2707,7 @@ void NyquistEffect::BuildEffectWindow(ShuttleGui & S)
|
|||
|
||||
if (ctrl.type != NYQ_CTRL_FILE)
|
||||
{
|
||||
if (ctrl.type == NYQ_CTRL_CHOICE || ctrl.label.IsEmpty())
|
||||
if (ctrl.type == NYQ_CTRL_CHOICE || ctrl.label.empty())
|
||||
{
|
||||
S.AddSpace(10, 10);
|
||||
}
|
||||
|
@ -2956,7 +2956,7 @@ void NyquistEffect::OnFileButton(wxCommandEvent& evt)
|
|||
wxArrayString selectedFiles;
|
||||
openFileDialog.GetPaths(selectedFiles);
|
||||
|
||||
for (size_t sf = 0; sf < selectedFiles.GetCount(); sf++) {
|
||||
for (size_t sf = 0; sf < selectedFiles.size(); sf++) {
|
||||
path += "\"";
|
||||
path += selectedFiles[sf];
|
||||
path += "\"";
|
||||
|
@ -2992,7 +2992,7 @@ void NyquistEffect::resolveFilePath(wxString& path, wxString extension /* empty
|
|||
int characters = path.Find(wxFileName::GetPathSeparator());
|
||||
if(characters == wxNOT_FOUND) // Just a path or just a file name
|
||||
{
|
||||
if (path.IsEmpty())
|
||||
if (path.empty())
|
||||
path = "*default*";
|
||||
|
||||
if (pathKeys.find(path) != pathKeys.end())
|
||||
|
@ -3023,7 +3023,7 @@ void NyquistEffect::resolveFilePath(wxString& path, wxString extension /* empty
|
|||
if (fname.wxFileName::IsOk() && fname.GetFullName() == wxEmptyString)
|
||||
{
|
||||
path = fname.GetPathWithSep() + _("untitled");
|
||||
if (!extension.IsEmpty())
|
||||
if (!extension.empty())
|
||||
path = path + extension;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ wxArrayString VampEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUS
|
|||
}
|
||||
|
||||
wxString path = wxString::FromUTF8(i->c_str()) + wxT("/") + name;
|
||||
names.Add(path);
|
||||
names.push_back(path);
|
||||
|
||||
++output;
|
||||
}
|
||||
|
|
|
@ -561,7 +561,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
wxArrayString choices;
|
||||
for (size_t i = 0, cnt = programs.size(); i < cnt; i++)
|
||||
{
|
||||
choices.Add(wxString::FromUTF8(programs[i].c_str()));
|
||||
choices.push_back(wxString::FromUTF8(programs[i].c_str()));
|
||||
}
|
||||
|
||||
S.AddPrompt(_("Program"));
|
||||
|
@ -592,7 +592,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
mValues[p] = 0.0;
|
||||
|
||||
wxString labelText = wxString::FromUTF8(mParameters[p].name.c_str());
|
||||
if (!unit.IsEmpty())
|
||||
if (!unit.empty())
|
||||
{
|
||||
labelText += wxT(" (") + unit + wxT(")");
|
||||
}
|
||||
|
@ -607,7 +607,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
mToggles[p] = S.AddCheckBox( {},
|
||||
value > 0.5 ? wxT("true") : wxT("false"));
|
||||
mToggles[p]->SetName(labelText);
|
||||
if (!tip.IsEmpty())
|
||||
if (!tip.empty())
|
||||
{
|
||||
mToggles[p]->SetToolTip(tip);
|
||||
}
|
||||
|
@ -633,14 +633,14 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
{
|
||||
selected = choice;
|
||||
}
|
||||
choices.Add(choice);
|
||||
choices.push_back(choice);
|
||||
}
|
||||
|
||||
S.Id(ID_Choices + p);
|
||||
mChoices[p] = S.AddChoice( {}, selected, &choices);
|
||||
mChoices[p]->SetName(labelText);
|
||||
mChoices[p]->SetSizeHints(-1, -1);
|
||||
if (!tip.IsEmpty())
|
||||
if (!tip.empty())
|
||||
{
|
||||
mChoices[p]->SetToolTip(tip);
|
||||
}
|
||||
|
@ -667,7 +667,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
mFields[p] = S.AddTextBox( {}, wxT(""), 12);
|
||||
mFields[p]->SetName(labelText);
|
||||
mFields[p]->SetValidator(vld);
|
||||
if (!tip.IsEmpty())
|
||||
if (!tip.empty())
|
||||
{
|
||||
mFields[p]->SetToolTip(tip);
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
|||
mSliders[p] = S.AddSlider( {}, 0, 1000, 0);
|
||||
mSliders[p]->SetName(labelText);
|
||||
mSliders[p]->SetSizeHints(150, -1);
|
||||
if (!tip.IsEmpty())
|
||||
if (!tip.empty())
|
||||
{
|
||||
mSliders[p]->SetToolTip(tip);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ void ExportPlugin::SetDescription(const wxString & description, int index)
|
|||
|
||||
void ExportPlugin::AddExtension(const wxString &extension,int index)
|
||||
{
|
||||
mFormatInfos[index].mExtensions.Add(extension);
|
||||
mFormatInfos[index].mExtensions.push_back(extension);
|
||||
}
|
||||
|
||||
void ExportPlugin::SetExtensions(const wxArrayString & extensions, int index)
|
||||
|
@ -170,7 +170,7 @@ wxArrayString ExportPlugin::GetExtensions(int index)
|
|||
|
||||
wxString ExportPlugin::GetMask(int index)
|
||||
{
|
||||
if (!mFormatInfos[index].mMask.IsEmpty()) {
|
||||
if (!mFormatInfos[index].mMask.empty()) {
|
||||
return mFormatInfos[index].mMask;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ wxString ExportPlugin::GetMask(int index)
|
|||
// Build the mask
|
||||
// wxString ext = GetExtension(index);
|
||||
wxArrayString exts = GetExtensions(index);
|
||||
for (size_t i = 0; i < exts.GetCount(); i++) {
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
mask += wxT("*.") + exts[i] + wxT(";");
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ bool Exporter::GetFilename()
|
|||
|
||||
wxString maskString;
|
||||
wxString defaultFormat = mFormatName;
|
||||
if( defaultFormat.IsEmpty() )
|
||||
if( defaultFormat.empty() )
|
||||
defaultFormat = gPrefs->Read(wxT("/Export/Format"),
|
||||
wxT("WAV"));
|
||||
|
||||
|
@ -624,7 +624,7 @@ bool Exporter::GetFilename()
|
|||
// Check the extension - add the default if it's not there,
|
||||
// and warn user if it's abnormal.
|
||||
//
|
||||
if (ext.IsEmpty()) {
|
||||
if (ext.empty()) {
|
||||
//
|
||||
// Make sure the user doesn't accidentally save the file
|
||||
// as an extension with no name, like just plain ".wav".
|
||||
|
@ -648,7 +648,7 @@ bool Exporter::GetFilename()
|
|||
{
|
||||
continue;
|
||||
}
|
||||
else if (!ext.IsEmpty() && !mPlugins[mFormat]->IsExtension(ext,mSubFormat) && ext.CmpNoCase(defext)) {
|
||||
else if (!ext.empty() && !mPlugins[mFormat]->IsExtension(ext,mSubFormat) && ext.CmpNoCase(defext)) {
|
||||
wxString prompt;
|
||||
prompt.Printf(_("You are about to export a %s file with the name \"%s\".\n\nNormally these files end in \".%s\", and some programs will not open files with nonstandard extensions.\n\nAre you sure you want to export the file under this name?"),
|
||||
mPlugins[mFormat]->GetFormat(mSubFormat),
|
||||
|
@ -730,7 +730,7 @@ bool Exporter::CheckFilename()
|
|||
if (!mProject->GetDirManager()->EnsureSafeFilename(mFilename))
|
||||
return false;
|
||||
|
||||
if( mFormatName.IsEmpty() )
|
||||
if( mFormatName.empty() )
|
||||
gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
|
||||
gPrefs->Write(wxT("/Export/Path"), mFilename.GetPath());
|
||||
gPrefs->Flush();
|
||||
|
@ -1311,12 +1311,12 @@ ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly
|
|||
const wxString sTrackName = (t->GetName()).Left(20);
|
||||
if( t->GetChannel() == Track::LeftChannel )
|
||||
/* i18n-hint: track name and L abbreviating Left channel */
|
||||
mTrackNames.Add( wxString::Format( _( "%s - L" ), sTrackName ) );
|
||||
mTrackNames.push_back( wxString::Format( _( "%s - L" ), sTrackName ) );
|
||||
else if( t->GetChannel() == Track::RightChannel )
|
||||
/* i18n-hint: track name and R abbreviating Right channel */
|
||||
mTrackNames.Add( wxString::Format( _( "%s - R" ), sTrackName ) );
|
||||
mTrackNames.push_back( wxString::Format( _( "%s - R" ), sTrackName ) );
|
||||
else
|
||||
mTrackNames.Add(sTrackName);
|
||||
mTrackNames.push_back(sTrackName);
|
||||
}
|
||||
|
||||
// JKC: This is an attempt to fix a 'watching brief' issue, where the slider is
|
||||
|
|
|
@ -103,7 +103,7 @@ void ExportCLOptions::PopulateOrExchange(ShuttleGui & S)
|
|||
wxString cmd;
|
||||
|
||||
for (size_t i = 0; i < mHistory.GetCount(); i++) {
|
||||
cmds.Add(mHistory.GetHistoryFile(i));
|
||||
cmds.push_back(mHistory.GetHistoryFile(i));
|
||||
}
|
||||
cmd = cmds[0];
|
||||
|
||||
|
@ -178,7 +178,7 @@ void ExportCLOptions::OnBrowse(wxCommandEvent& WXUNUSED(event))
|
|||
wxT("*") + ext,
|
||||
wxFD_OPEN | wxRESIZE_BORDER,
|
||||
this);
|
||||
if (path.IsEmpty()) {
|
||||
if (path.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
|
|||
if (reg.Exists()) {
|
||||
wxString ipath;
|
||||
reg.QueryValue(wxT("InstallPath"), ipath);
|
||||
if (!ipath.IsEmpty()) {
|
||||
if (!ipath.empty()) {
|
||||
npath += wxPATH_SEP + ipath;
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
|
|||
{
|
||||
#if defined(__WXMSW__)
|
||||
auto cleanup = finally( [&] {
|
||||
if (!opath.IsEmpty()) {
|
||||
if (!opath.empty()) {
|
||||
wxSetEnv(wxT("PATH"),opath);
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -1027,7 +1027,7 @@ int ExportFFmpeg::AskResample(int bitrate, int rate, int lowrate, int highrate,
|
|||
if (label >= lowrate && label <= highrate)
|
||||
{
|
||||
wxString name = wxString::Format(wxT("%d"),label);
|
||||
choices.Add(name);
|
||||
choices.push_back(name);
|
||||
if (label <= rate)
|
||||
{
|
||||
selected = name;
|
||||
|
@ -1035,7 +1035,7 @@ int ExportFFmpeg::AskResample(int bitrate, int rate, int lowrate, int highrate,
|
|||
}
|
||||
}
|
||||
|
||||
if (selected.IsEmpty())
|
||||
if (selected.empty())
|
||||
{
|
||||
selected = choices[0];
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ ExportFFmpegAC3Options::ExportFFmpegAC3Options(wxWindow *parent, int WXUNUSED(fo
|
|||
{
|
||||
for (unsigned int i=0; i < (sizeof(iAC3BitRates)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%i kbps"),iAC3BitRates[i]/1000));
|
||||
mBitRateNames.push_back(wxString::Format(_("%i kbps"),iAC3BitRates[i]/1000));
|
||||
mBitRateLabels.push_back(iAC3BitRates[i]);
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ ExportFFmpegAMRNBOptions::ExportFFmpegAMRNBOptions(wxWindow *parent, int WXUNUSE
|
|||
{
|
||||
for (unsigned int i=0; i < (sizeof(iAMRNBBitRate)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%.2f kbps"),(float)iAMRNBBitRate[i]/1000));
|
||||
mBitRateNames.push_back(wxString::Format(_("%.2f kbps"),(float)iAMRNBBitRate[i]/1000));
|
||||
mBitRateLabels.push_back(iAMRNBBitRate[i]);
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,7 @@ ExportFFmpegWMAOptions::ExportFFmpegWMAOptions(wxWindow *parent, int WXUNUSED(fo
|
|||
for (unsigned int i=0; i < (sizeof(iWMABitRate)/sizeof(int)); i++)
|
||||
{
|
||||
/* i18n-hint: abbreviates thousands of bits per second */
|
||||
mBitRateNames.Add(wxString::Format(_("%i kbps"),iWMABitRate[i]/1000));
|
||||
mBitRateNames.push_back(wxString::Format(_("%i kbps"),iWMABitRate[i]/1000));
|
||||
mBitRateLabels.push_back(iWMABitRate[i]);
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ void ExportFFmpegCustomOptions::OnOpen(wxCommandEvent & WXUNUSED(evt))
|
|||
|
||||
FFmpegPreset::FFmpegPreset()
|
||||
{
|
||||
mControlState.SetCount(FELastID - FEFirstID);
|
||||
mControlState.resize(FELastID - FEFirstID);
|
||||
}
|
||||
|
||||
FFmpegPreset::~FFmpegPreset()
|
||||
|
@ -532,14 +532,14 @@ void FFmpegPresets::ExportPresets(wxString &filename)
|
|||
|
||||
void FFmpegPresets::GetPresetList(wxArrayString &list)
|
||||
{
|
||||
list.Clear();
|
||||
list.clear();
|
||||
FFmpegPresetMap::iterator iter;
|
||||
for (iter = mPresets.begin(); iter != mPresets.end(); ++iter)
|
||||
{
|
||||
list.Add(iter->second.mPresetName);
|
||||
list.push_back(iter->second.mPresetName);
|
||||
}
|
||||
|
||||
list.Sort();
|
||||
std::sort( list.begin(), list.end() );
|
||||
}
|
||||
|
||||
void FFmpegPresets::DeletePreset(wxString &name)
|
||||
|
@ -613,10 +613,10 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
switch(id)
|
||||
{
|
||||
case FEFormatID:
|
||||
preset->mControlState.Item(id - FEFirstID) = format;
|
||||
preset->mControlState[id - FEFirstID] = format;
|
||||
break;
|
||||
case FECodecID:
|
||||
preset->mControlState.Item(id - FEFirstID) = codec;
|
||||
preset->mControlState[id - FEFirstID] = codec;
|
||||
break;
|
||||
// Spin control
|
||||
case FEBitrateID:
|
||||
|
@ -634,26 +634,26 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
case FEMuxRateID:
|
||||
case FEPacketSizeID:
|
||||
sc = dynamic_cast<wxSpinCtrl*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID) = wxString::Format(wxT("%d"),sc->GetValue());
|
||||
preset->mControlState[id - FEFirstID] = wxString::Format(wxT("%d"),sc->GetValue());
|
||||
break;
|
||||
// Text control
|
||||
case FELanguageID:
|
||||
case FETagID:
|
||||
tc = dynamic_cast<wxTextCtrl*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID) = tc->GetValue();
|
||||
preset->mControlState[id - FEFirstID] = tc->GetValue();
|
||||
break;
|
||||
// Choice
|
||||
case FEProfileID:
|
||||
case FEPredOrderID:
|
||||
ch = dynamic_cast<wxChoice*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID) = wxString::Format(wxT("%d"),ch->GetSelection());
|
||||
preset->mControlState[id - FEFirstID] = wxString::Format(wxT("%d"),ch->GetSelection());
|
||||
break;
|
||||
// Check box
|
||||
case FEUseLPCID:
|
||||
case FEBitReservoirID:
|
||||
case FEVariableBlockLenID:
|
||||
cb = dynamic_cast<wxCheckBox*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID) = wxString::Format(wxT("%d"),cb->GetValue());
|
||||
preset->mControlState[id - FEFirstID] = wxString::Format(wxT("%d"),cb->GetValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ void FFmpegPresets::LoadPreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
case FEFormatID:
|
||||
case FECodecID:
|
||||
lb = dynamic_cast<wxListBox*>(wnd);
|
||||
readstr = preset->mControlState.Item(id - FEFirstID);
|
||||
readstr = preset->mControlState[id - FEFirstID];
|
||||
readlong = lb->FindString(readstr);
|
||||
if (readlong > -1) lb->Select(readlong);
|
||||
break;
|
||||
|
@ -709,20 +709,20 @@ void FFmpegPresets::LoadPreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
case FEMuxRateID:
|
||||
case FEPacketSizeID:
|
||||
sc = dynamic_cast<wxSpinCtrl*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID).ToLong(&readlong);
|
||||
preset->mControlState[id - FEFirstID].ToLong(&readlong);
|
||||
sc->SetValue(readlong);
|
||||
break;
|
||||
// Text control
|
||||
case FELanguageID:
|
||||
case FETagID:
|
||||
tc = dynamic_cast<wxTextCtrl*>(wnd);
|
||||
tc->SetValue(preset->mControlState.Item(id - FEFirstID));
|
||||
tc->SetValue(preset->mControlState[id - FEFirstID]);
|
||||
break;
|
||||
// Choice
|
||||
case FEProfileID:
|
||||
case FEPredOrderID:
|
||||
ch = dynamic_cast<wxChoice*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID).ToLong(&readlong);
|
||||
preset->mControlState[id - FEFirstID].ToLong(&readlong);
|
||||
if (readlong > -1) ch->Select(readlong);
|
||||
break;
|
||||
// Check box
|
||||
|
@ -730,7 +730,7 @@ void FFmpegPresets::LoadPreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
case FEBitReservoirID:
|
||||
case FEVariableBlockLenID:
|
||||
cb = dynamic_cast<wxCheckBox*>(wnd);
|
||||
preset->mControlState.Item(id - FEFirstID).ToLong(&readlong);
|
||||
preset->mControlState[id - FEFirstID].ToLong(&readlong);
|
||||
if (readlong) readbool = true; else readbool = false;
|
||||
cb->SetValue(readbool);
|
||||
break;
|
||||
|
@ -810,7 +810,7 @@ bool FFmpegPresets::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
else if (!wxStrcmp(attr,wxT("state")))
|
||||
{
|
||||
if (id > FEFirstID && id < FELastID)
|
||||
mPreset->mControlState.Item(id - FEFirstID) = wxString(value);
|
||||
mPreset->mControlState[id - FEFirstID] = wxString(value);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -872,7 +872,7 @@ void FFmpegPresets::WriteXML(XMLWriter &xmlFile) const
|
|||
{
|
||||
xmlFile.StartTag(wxT("setctrlstate"));
|
||||
xmlFile.WriteAttr(wxT("id"),wxString(FFmpegExportCtrlIDNames[i - FEFirstID]));
|
||||
xmlFile.WriteAttr(wxT("state"),preset->mControlState.Item(i - FEFirstID));
|
||||
xmlFile.WriteAttr(wxT("state"),preset->mControlState[i - FEFirstID]);
|
||||
xmlFile.EndTag(wxT("setctrlstate"));
|
||||
}
|
||||
xmlFile.EndTag(wxT("preset"));
|
||||
|
@ -1385,12 +1385,12 @@ ExportFFmpegOptions::ExportFFmpegOptions(wxWindow *parent)
|
|||
for (unsigned int i = 0; i < 6; i++)
|
||||
{
|
||||
mPredictionOrderMethodLabels.push_back(i);
|
||||
mPredictionOrderMethodNames.Add(wxString::Format(wxT("%s"),PredictionOrderMethodNames(i)));
|
||||
mPredictionOrderMethodNames.push_back(wxString::Format(wxT("%s"),PredictionOrderMethodNames(i)));
|
||||
}
|
||||
|
||||
for (unsigned int i=0; i < (sizeof(iAACProfileValues)/sizeof(int)); i++)
|
||||
{
|
||||
mProfileNames.Add(wxString::Format(wxT("%s"),iAACProfileNames(i)));
|
||||
mProfileNames.push_back(wxString::Format(wxT("%s"),iAACProfileNames(i)));
|
||||
mProfileLabels.push_back(iAACProfileValues[i]);
|
||||
}
|
||||
|
||||
|
@ -1420,8 +1420,8 @@ void ExportFFmpegOptions::FetchFormatList()
|
|||
// If it doesn't, then it doesn't supports any audio codecs
|
||||
if (ofmt->audio_codec != AV_CODEC_ID_NONE)
|
||||
{
|
||||
mFormatNames.Add(wxString::FromUTF8(ofmt->name));
|
||||
mFormatLongNames.Add(wxString::Format(wxT("%s - %s"),mFormatNames.Last(),wxString::FromUTF8(ofmt->long_name)));
|
||||
mFormatNames.push_back(wxString::FromUTF8(ofmt->name));
|
||||
mFormatLongNames.push_back(wxString::Format(wxT("%s - %s"),mFormatNames.back(),wxString::FromUTF8(ofmt->long_name)));
|
||||
}
|
||||
}
|
||||
// Show all formats
|
||||
|
@ -1440,8 +1440,8 @@ void ExportFFmpegOptions::FetchCodecList()
|
|||
// We're only interested in audio and only in encoders
|
||||
if (codec->type == AVMEDIA_TYPE_AUDIO && av_codec_is_encoder(codec))
|
||||
{
|
||||
mCodecNames.Add(wxString::FromUTF8(codec->name));
|
||||
mCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
|
||||
mCodecNames.push_back(wxString::FromUTF8(codec->name));
|
||||
mCodecLongNames.push_back(wxString::Format(wxT("%s - %s"),mCodecNames.back(),wxString::FromUTF8(codec->long_name)));
|
||||
}
|
||||
}
|
||||
// Show all codecs
|
||||
|
@ -1660,8 +1660,8 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
|
|||
// By default assume that id is not in the list
|
||||
int index = -1;
|
||||
// By default no codecs are compatible (yet)
|
||||
mShownCodecNames.Clear();
|
||||
mShownCodecLongNames.Clear();
|
||||
mShownCodecNames.clear();
|
||||
mShownCodecLongNames.clear();
|
||||
// Clear the listbox
|
||||
mCodecList->Clear();
|
||||
// Zero - format is not found at all
|
||||
|
@ -1685,9 +1685,9 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
|
|||
if (codec != NULL && (codec->type == AVMEDIA_TYPE_AUDIO) && av_codec_is_encoder(codec))
|
||||
{
|
||||
// If it was selected - remember it's NEW index
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.GetCount();
|
||||
mShownCodecNames.Add(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.size();
|
||||
mShownCodecNames.push_back(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.push_back(wxString::Format(wxT("%s - %s"),mShownCodecNames.back(),wxString::FromUTF8(codec->long_name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1701,9 +1701,9 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
|
|||
{
|
||||
if (mShownCodecNames.Index(wxString::FromUTF8(codec->name)) < 0)
|
||||
{
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.GetCount();
|
||||
mShownCodecNames.Add(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.size();
|
||||
mShownCodecNames.push_back(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.push_back(wxString::Format(wxT("%s - %s"),mShownCodecNames.back(),wxString::FromUTF8(codec->long_name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1719,9 +1719,9 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
|
|||
AVCodec *codec = avcodec_find_encoder(format->audio_codec);
|
||||
if (codec != NULL && (codec->type == AVMEDIA_TYPE_AUDIO) && av_codec_is_encoder(codec))
|
||||
{
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.GetCount();
|
||||
mShownCodecNames.Add(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
|
||||
if ((id >= 0) && codec->id == id) index = mShownCodecNames.size();
|
||||
mShownCodecNames.push_back(wxString::FromUTF8(codec->name));
|
||||
mShownCodecLongNames.push_back(wxString::Format(wxT("%s - %s"),mShownCodecNames.back(),wxString::FromUTF8(codec->long_name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1736,8 +1736,8 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
|
|||
int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfmt)
|
||||
{
|
||||
int index = -1;
|
||||
mShownFormatNames.Clear();
|
||||
mShownFormatLongNames.Clear();
|
||||
mShownFormatNames.clear();
|
||||
mShownFormatLongNames.clear();
|
||||
mFormatList->Clear();
|
||||
AVOutputFormat *ofmt = NULL;
|
||||
ofmt = NULL;
|
||||
|
@ -1747,11 +1747,11 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm
|
|||
{
|
||||
if (CompatibilityList[i].codec == id || CompatibilityList[i].codec == AV_CODEC_ID_NONE)
|
||||
{
|
||||
if ((selfmt != NULL) && (selfmt->Cmp(CompatibilityList[i].fmt) == 0)) index = mShownFormatNames.GetCount();
|
||||
FromList.Add(CompatibilityList[i].fmt);
|
||||
mShownFormatNames.Add(CompatibilityList[i].fmt);
|
||||
if ((selfmt != NULL) && (selfmt->Cmp(CompatibilityList[i].fmt) == 0)) index = mShownFormatNames.size();
|
||||
FromList.push_back(CompatibilityList[i].fmt);
|
||||
mShownFormatNames.push_back(CompatibilityList[i].fmt);
|
||||
AVOutputFormat *tofmt = av_guess_format(wxString(CompatibilityList[i].fmt).ToUTF8(),NULL,NULL);
|
||||
if (tofmt != NULL) mShownFormatLongNames.Add(wxString::Format(wxT("%s - %s"),CompatibilityList[i].fmt,wxString::FromUTF8(tofmt->long_name)));
|
||||
if (tofmt != NULL) mShownFormatLongNames.push_back(wxString::Format(wxT("%s - %s"),CompatibilityList[i].fmt,wxString::FromUTF8(tofmt->long_name)));
|
||||
}
|
||||
}
|
||||
bool found = false;
|
||||
|
@ -1776,7 +1776,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm
|
|||
{
|
||||
wxString ofmtname = wxString::FromUTF8(ofmt->name);
|
||||
found = false;
|
||||
for (unsigned int i = 0; i < FromList.GetCount(); i++)
|
||||
for (unsigned int i = 0; i < FromList.size(); i++)
|
||||
{
|
||||
if (ofmtname.Cmp(FromList[i]) == 0)
|
||||
{
|
||||
|
@ -1786,9 +1786,9 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm
|
|||
}
|
||||
if (!found)
|
||||
{
|
||||
if ((selfmt != NULL) && (selfmt->Cmp(wxString::FromUTF8(ofmt->name)) == 0)) index = mShownFormatNames.GetCount();
|
||||
mShownFormatNames.Add(wxString::FromUTF8(ofmt->name));
|
||||
mShownFormatLongNames.Add(wxString::Format(wxT("%s - %s"),mShownFormatNames.Last(),wxString::FromUTF8(ofmt->long_name)));
|
||||
if ((selfmt != NULL) && (selfmt->Cmp(wxString::FromUTF8(ofmt->name)) == 0)) index = mShownFormatNames.size();
|
||||
mShownFormatNames.push_back(wxString::FromUTF8(ofmt->name));
|
||||
mShownFormatLongNames.push_back(wxString::Format(wxT("%s - %s"),mShownFormatNames.back(),wxString::FromUTF8(ofmt->long_name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1803,7 +1803,7 @@ void ExportFFmpegOptions::OnDeletePreset(wxCommandEvent& WXUNUSED(event))
|
|||
{
|
||||
wxComboBox *preset = dynamic_cast<wxComboBox*>(FindWindowById(FEPresetID,this));
|
||||
wxString presetname = preset->GetValue();
|
||||
if (presetname.IsEmpty())
|
||||
if (presetname.empty())
|
||||
{
|
||||
AudacityMessageBox(_("You can't delete a preset without name"));
|
||||
return;
|
||||
|
@ -1826,7 +1826,7 @@ void ExportFFmpegOptions::OnSavePreset(wxCommandEvent& WXUNUSED(event))
|
|||
{
|
||||
wxComboBox *preset = dynamic_cast<wxComboBox*>(FindWindowById(FEPresetID,this));
|
||||
wxString name = preset->GetValue();
|
||||
if (name.IsEmpty())
|
||||
if (name.empty())
|
||||
{
|
||||
AudacityMessageBox(_("You can't save a preset without name"));
|
||||
return;
|
||||
|
@ -1835,7 +1835,7 @@ void ExportFFmpegOptions::OnSavePreset(wxCommandEvent& WXUNUSED(event))
|
|||
int index = mPresetNames.Index(name,false);
|
||||
if (index == -1)
|
||||
{
|
||||
mPresetNames.Add(name);
|
||||
mPresetNames.push_back(name);
|
||||
mPresetCombo->Clear();
|
||||
mPresetCombo->Append(mPresetNames);
|
||||
mPresetCombo->Select(mPresetNames.Index(name,false));
|
||||
|
|
|
@ -104,7 +104,7 @@ ExportMP2Options::ExportMP2Options(wxWindow *parent, int WXUNUSED(format))
|
|||
{
|
||||
for (unsigned int i=0; i < (sizeof(iBitrates)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%i kbps"),iBitrates[i]));
|
||||
mBitRateNames.push_back(wxString::Format(_("%i kbps"),iBitrates[i]));
|
||||
mBitRateLabels.push_back(iBitrates[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -536,7 +536,7 @@ wxArrayString ExportMP3Options::GetNames(CHOICES *choices, int count)
|
|||
wxArrayString names;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
names.Add(choices[i].name);
|
||||
names.push_back(choices[i].name);
|
||||
}
|
||||
|
||||
return names;
|
||||
|
@ -615,7 +615,7 @@ public:
|
|||
S.StartMultiColumn(2, wxEXPAND);
|
||||
S.SetStretchyCol(0);
|
||||
{
|
||||
if (mLibPath.GetFullPath().IsEmpty()) {
|
||||
if (mLibPath.GetFullPath().empty()) {
|
||||
/* i18n-hint: There is a button to the right of the arrow.*/
|
||||
text.Printf(_("To find %s, click here -->"), mName);
|
||||
mPathText = S.AddTextBox( {}, text, 0);
|
||||
|
@ -659,7 +659,7 @@ public:
|
|||
mType,
|
||||
wxFD_OPEN | wxRESIZE_BORDER,
|
||||
this);
|
||||
if (!path.IsEmpty()) {
|
||||
if (!path.empty()) {
|
||||
mLibPath = path;
|
||||
mPathText->SetValue(path);
|
||||
}
|
||||
|
@ -943,7 +943,7 @@ bool MP3Exporter::FindLibrary(wxWindow *parent)
|
|||
wxString path;
|
||||
wxString name;
|
||||
|
||||
if (!mLibPath.IsEmpty()) {
|
||||
if (!mLibPath.empty()) {
|
||||
wxFileName fn = mLibPath;
|
||||
path = fn.GetPath();
|
||||
name = fn.GetFullName();
|
||||
|
@ -985,7 +985,7 @@ bool MP3Exporter::LoadLibrary(wxWindow *parent, AskUser askuser)
|
|||
#endif
|
||||
|
||||
// First try loading it from a previously located path
|
||||
if (!mLibPath.IsEmpty()) {
|
||||
if (!mLibPath.empty()) {
|
||||
wxLogMessage(wxT("Attempting to load LAME from previously defined path"));
|
||||
mLibraryLoaded = InitLibrary(mLibPath);
|
||||
}
|
||||
|
@ -1016,7 +1016,7 @@ bool MP3Exporter::LoadLibrary(wxWindow *parent, AskUser askuser)
|
|||
// Oh well, just give up
|
||||
if (!ValidLibraryLoaded()) {
|
||||
#if defined(__WXMSW__)
|
||||
if (askuser && !mBladeVersion.IsEmpty()) {
|
||||
if (askuser && !mBladeVersion.empty()) {
|
||||
AudacityMessageBox(mBladeVersion);
|
||||
}
|
||||
#endif
|
||||
|
@ -1763,7 +1763,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
}
|
||||
|
||||
// Verify sample rate
|
||||
if (FindName(sampRates, WXSIZEOF(sampRates), rate).IsEmpty() ||
|
||||
if (FindName(sampRates, WXSIZEOF(sampRates), rate).empty() ||
|
||||
(rate < lowrate) || (rate > highrate)) {
|
||||
rate = AskResample(bitrate, rate, lowrate, highrate);
|
||||
if (rate == 0) {
|
||||
|
@ -2006,14 +2006,14 @@ int ExportMP3::AskResample(int bitrate, int rate, int lowrate, int highrate)
|
|||
for (size_t i = 0; i < WXSIZEOF(sampRates); i++) {
|
||||
int label = sampRates[i].label;
|
||||
if (label >= lowrate && label <= highrate) {
|
||||
choices.Add(sampRates[i].name);
|
||||
choices.push_back(sampRates[i].name);
|
||||
if (label <= rate) {
|
||||
selected = sampRates[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selected.IsEmpty()) {
|
||||
if (selected.empty()) {
|
||||
selected = choices[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
|
|||
++i;
|
||||
for (int j = 0; j < pPlugin->GetFormatCount(); j++)
|
||||
{
|
||||
formats.Add(mPlugins[i]->GetDescription(j));
|
||||
formats.push_back(mPlugins[i]->GetDescription(j));
|
||||
if (mPlugins[i]->GetFormat(j) == defaultFormat) {
|
||||
mPluginIndex = i;
|
||||
mSubFormatIndex = j;
|
||||
|
@ -542,7 +542,7 @@ void ExportMultiple::OnExport(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
// bool overwrite = mOverwrite->GetValue();
|
||||
ProgressResult ok = ProgressResult::Failed;
|
||||
mExported.Empty();
|
||||
mExported.clear();
|
||||
|
||||
// Give 'em the result
|
||||
auto cleanup = finally( [&]
|
||||
|
@ -556,10 +556,10 @@ void ExportMultiple::OnExport(wxCommandEvent& WXUNUSED(event))
|
|||
: _("Something went really wrong after exporting the following %lld file(s).")
|
||||
)
|
||||
)
|
||||
), (long long) mExported.GetCount());
|
||||
), (long long) mExported.size());
|
||||
|
||||
wxString FileList;
|
||||
for (size_t i = 0; i < mExported.GetCount(); i++) {
|
||||
for (size_t i = 0; i < mExported.size(); i++) {
|
||||
FileList += mExported[i];
|
||||
FileList += '\n';
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
|
|||
setting.t1 = mTracks->GetEndTime();
|
||||
}
|
||||
|
||||
if( name.IsEmpty() )
|
||||
if( name.empty() )
|
||||
name = _("untitled");
|
||||
|
||||
// store title of label to use in tags
|
||||
|
@ -692,7 +692,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
|
|||
|
||||
// store sanitised and user checked name in object
|
||||
setting.destfile.SetName(MakeFileName(name));
|
||||
if( setting.destfile.GetName().IsEmpty() )
|
||||
if( setting.destfile.GetName().empty() )
|
||||
{ // user cancelled dialogue, or deleted everything in field.
|
||||
// or maybe the label was empty??
|
||||
// So we ignore this one and keep going.
|
||||
|
@ -733,7 +733,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
|
|||
/* get the settings to use for the export from the array */
|
||||
activeSetting = exportSettings[count];
|
||||
// Bug 1440 fix.
|
||||
if( activeSetting.destfile.GetName().IsEmpty() )
|
||||
if( activeSetting.destfile.GetName().empty() )
|
||||
continue;
|
||||
|
||||
// Export it
|
||||
|
@ -787,7 +787,7 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
|
|||
|
||||
// Get name and title
|
||||
title = tr->GetName();
|
||||
if( title.IsEmpty() )
|
||||
if( title.empty() )
|
||||
title = _("untitled");
|
||||
|
||||
if (byName) {
|
||||
|
@ -804,7 +804,7 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
|
|||
// store sanitised and user checked name in object
|
||||
setting.destfile.SetName(MakeFileName(name));
|
||||
|
||||
if (setting.destfile.GetName().IsEmpty())
|
||||
if (setting.destfile.GetName().empty())
|
||||
{ // user cancelled dialogue, or deleted everything in field.
|
||||
// So we ignore this one and keep going.
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
|
|||
wxLogDebug( "Get setting %i", count );
|
||||
/* get the settings to use for the export from the array */
|
||||
activeSetting = exportSettings[count];
|
||||
if( activeSetting.destfile.GetName().IsEmpty() ){
|
||||
if( activeSetting.destfile.GetName().empty() ){
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
|
@ -951,7 +951,7 @@ ProgressResult ExportMultiple::DoExport(std::unique_ptr<ProgressDialog> &pDialog
|
|||
mSubFormatIndex);
|
||||
|
||||
if (success == ProgressResult::Success || success == ProgressResult::Stopped) {
|
||||
mExported.Add(fullPath);
|
||||
mExported.push_back(fullPath);
|
||||
}
|
||||
|
||||
Refresh();
|
||||
|
|
|
@ -147,7 +147,7 @@ ExportPCMOptions::ExportPCMOptions(wxWindow *parent, int selformat)
|
|||
|
||||
mHeaderFromChoice = 0;
|
||||
for (int i = 0, num = sf_num_headers(); i < num; i++) {
|
||||
mHeaderNames.Add(sf_header_index_name(i));
|
||||
mHeaderNames.push_back(sf_header_index_name(i));
|
||||
if ((format & SF_FORMAT_TYPEMASK) == (int)sf_header_index_to_type(i))
|
||||
mHeaderFromChoice = i;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ ExportPCMOptions::ExportPCMOptions(wxWindow *parent, int selformat)
|
|||
bool valid = ValidatePair(fmt);
|
||||
if (valid)
|
||||
{
|
||||
mEncodingNames.Add(sf_encoding_index_name(i));
|
||||
mEncodingNames.push_back(sf_encoding_index_name(i));
|
||||
mEncodingFormats.push_back(enc);
|
||||
if ((format & SF_FORMAT_SUBMASK) == (int)sf_encoding_index_to_subtype(i))
|
||||
mEncodingFromChoice = sel;
|
||||
|
@ -235,7 +235,7 @@ void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
|||
if( format == SF_FORMAT_AIFF )
|
||||
format = SF_FORMAT_AIFF | SF_FORMAT_PCM_16;
|
||||
|
||||
mEncodingNames.Clear();
|
||||
mEncodingNames.clear();
|
||||
mEncodingChoice->Clear();
|
||||
mEncodingFormats.clear();
|
||||
int sel = wxNOT_FOUND;
|
||||
|
@ -259,7 +259,7 @@ void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
|||
if (valid)
|
||||
{
|
||||
const auto name = sf_encoding_index_name(i);
|
||||
mEncodingNames.Add(name);
|
||||
mEncodingNames.push_back(name);
|
||||
mEncodingChoice->Append(name);
|
||||
mEncodingFormats.push_back(encSubtype);
|
||||
for (j = 0; j < sfnum; j++)
|
||||
|
|
|
@ -135,7 +135,7 @@ void Importer::StringToList(wxString &str, wxString &delims, wxArrayString &list
|
|||
wxStringTokenizer toker;
|
||||
|
||||
for (toker.SetString(str, delims, mod);
|
||||
toker.HasMoreTokens(); list.Add (toker.GetNextToken()));
|
||||
toker.HasMoreTokens(); list.push_back(toker.GetNextToken()));
|
||||
}
|
||||
|
||||
void Importer::ReadImportItems()
|
||||
|
@ -195,14 +195,14 @@ void Importer::ReadImportItems()
|
|||
/* Filters are stored in one list, but the position at which
|
||||
* unused filters start is remembered
|
||||
*/
|
||||
new_item->divider = new_item->filters.Count();
|
||||
new_item->divider = new_item->filters.size();
|
||||
StringToList (unused_filters, delims, new_item->filters);
|
||||
}
|
||||
else
|
||||
new_item->divider = -1;
|
||||
|
||||
/* Find corresponding filter object for each filter ID */
|
||||
for (size_t i = 0; i < new_item->filters.Count(); i++)
|
||||
for (size_t i = 0; i < new_item->filters.size(); i++)
|
||||
{
|
||||
bool found = false;
|
||||
for (const auto &importPlugin : mImportPluginList)
|
||||
|
@ -235,7 +235,7 @@ void Importer::ReadImportItems()
|
|||
{
|
||||
int index = new_item->divider;
|
||||
if (new_item->divider < 0)
|
||||
index = new_item->filters.Count();
|
||||
index = new_item->filters.size();
|
||||
new_item->filters.Insert(importPlugin->GetPluginStringID(),index);
|
||||
new_item->filter_objects.insert(
|
||||
new_item->filter_objects.begin() + index, importPlugin.get());
|
||||
|
@ -254,35 +254,35 @@ void Importer::WriteImportItems()
|
|||
for (i = 0; i < this->mExtImportItems.size(); i++)
|
||||
{
|
||||
ExtImportItem *item = mExtImportItems[i].get();
|
||||
val.Clear();
|
||||
val.clear();
|
||||
|
||||
for (size_t j = 0; j < item->extensions.Count(); j++)
|
||||
for (size_t j = 0; j < item->extensions.size(); j++)
|
||||
{
|
||||
val.Append (item->extensions[j]);
|
||||
if (j < item->extensions.Count() - 1)
|
||||
if (j < item->extensions.size() - 1)
|
||||
val.Append (wxT(":"));
|
||||
}
|
||||
val.Append (wxT("\\"));
|
||||
for (size_t j = 0; j < item->mime_types.Count(); j++)
|
||||
for (size_t j = 0; j < item->mime_types.size(); j++)
|
||||
{
|
||||
val.Append (item->mime_types[j]);
|
||||
if (j < item->mime_types.Count() - 1)
|
||||
if (j < item->mime_types.size() - 1)
|
||||
val.Append (wxT(":"));
|
||||
}
|
||||
val.Append (wxT("|"));
|
||||
for (size_t j = 0; j < item->filters.Count() && ((int) j < item->divider || item->divider < 0); j++)
|
||||
for (size_t j = 0; j < item->filters.size() && ((int) j < item->divider || item->divider < 0); j++)
|
||||
{
|
||||
val.Append (item->filters[j]);
|
||||
if (j < item->filters.Count() - 1 && ((int) j < item->divider - 1 || item->divider < 0))
|
||||
if (j < item->filters.size() - 1 && ((int) j < item->divider - 1 || item->divider < 0))
|
||||
val.Append (wxT(":"));
|
||||
}
|
||||
if (item->divider >= 0)
|
||||
{
|
||||
val.Append (wxT("\\"));
|
||||
for (size_t j = item->divider; j < item->filters.Count(); j++)
|
||||
for (size_t j = item->divider; j < item->filters.size(); j++)
|
||||
{
|
||||
val.Append (item->filters[j]);
|
||||
if (j < item->filters.Count() - 1)
|
||||
if (j < item->filters.size() - 1)
|
||||
val.Append (wxT(":"));
|
||||
}
|
||||
}
|
||||
|
@ -311,12 +311,12 @@ void Importer::WriteImportItems()
|
|||
std::unique_ptr<ExtImportItem> Importer::CreateDefaultImportItem()
|
||||
{
|
||||
auto new_item = std::make_unique<ExtImportItem>();
|
||||
new_item->extensions.Add(wxT("*"));
|
||||
new_item->mime_types.Add(wxT("*"));
|
||||
new_item->extensions.push_back(wxT("*"));
|
||||
new_item->mime_types.push_back(wxT("*"));
|
||||
|
||||
for (const auto &importPlugin : mImportPluginList)
|
||||
{
|
||||
new_item->filters.Add (importPlugin->GetPluginStringID());
|
||||
new_item->filters.push_back(importPlugin->GetPluginStringID());
|
||||
new_item->filter_objects.push_back(importPlugin.get());
|
||||
}
|
||||
new_item->divider = -1;
|
||||
|
@ -396,7 +396,7 @@ bool Importer::Import(const wxString &fName,
|
|||
ExtImportItem *item = uItem.get();
|
||||
bool matches_ext = false, matches_mime = false;
|
||||
wxLogDebug(wxT("Testing extensions"));
|
||||
for (size_t j = 0; j < item->extensions.Count(); j++)
|
||||
for (size_t j = 0; j < item->extensions.size(); j++)
|
||||
{
|
||||
wxLogDebug(wxT("%s"), item->extensions[j].Lower());
|
||||
if (wxMatchWild (item->extensions[j].Lower(),fName.Lower(), false))
|
||||
|
@ -406,7 +406,7 @@ bool Importer::Import(const wxString &fName,
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (item->extensions.Count() == 0)
|
||||
if (item->extensions.size() == 0)
|
||||
{
|
||||
wxLogDebug(wxT("Match! (empty list)"));
|
||||
matches_ext = true;
|
||||
|
@ -415,7 +415,7 @@ bool Importer::Import(const wxString &fName,
|
|||
wxLogDebug(wxT("Testing mime types"));
|
||||
else
|
||||
wxLogDebug(wxT("Not testing mime types"));
|
||||
for (size_t j = 0; matches_ext && j < item->mime_types.Count(); j++)
|
||||
for (size_t j = 0; matches_ext && j < item->mime_types.size(); j++)
|
||||
{
|
||||
if (wxMatchWild (item->mime_types[j].Lower(),mime_type.Lower(), false))
|
||||
{
|
||||
|
@ -424,7 +424,7 @@ bool Importer::Import(const wxString &fName,
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (item->mime_types.Count() == 0)
|
||||
if (item->mime_types.size() == 0)
|
||||
{
|
||||
wxLogDebug(wxT("Match! (empty list)"));
|
||||
matches_mime = true;
|
||||
|
|
|
@ -453,7 +453,7 @@ bool FFmpegImportFileHandle::InitCodecs()
|
|||
}
|
||||
strinfo.Printf(_("Index[%02x] Codec[%s], Language[%s], Bitrate[%s], Channels[%d], Duration[%d]"),
|
||||
sc->m_stream->id,codec->name,lang,bitrate,(int)sc->m_stream->codec->channels,(int)duration);
|
||||
mStreamInfo.Add(strinfo);
|
||||
mStreamInfo.push_back(strinfo);
|
||||
mScs->get()[mNumStreams++] = std::move(sc);
|
||||
}
|
||||
//for video and unknown streams do nothing
|
||||
|
|
|
@ -192,7 +192,7 @@ void MyFLACFile::metadata_callback(const FLAC__StreamMetadata *metadata)
|
|||
{
|
||||
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
|
||||
for (FLAC__uint32 i = 0; i < metadata->data.vorbis_comment.num_comments; i++) {
|
||||
mComments.Add(UTF8CTOWX((char *)metadata->data.vorbis_comment.comments[i].entry));
|
||||
mComments.push_back(UTF8CTOWX((char *)metadata->data.vorbis_comment.comments[i].entry));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -528,7 +528,7 @@ ProgressResult FLACImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
outTracks.push_back(std::move(mChannels));
|
||||
|
||||
tags->Clear();
|
||||
size_t cnt = mFile->mComments.GetCount();
|
||||
size_t cnt = mFile->mComments.size();
|
||||
for (size_t c = 0; c < cnt; c++) {
|
||||
wxString name = mFile->mComments[c].BeforeFirst(wxT('='));
|
||||
wxString value = mFile->mComments[c].AfterFirst(wxT('='));
|
||||
|
|
|
@ -302,7 +302,7 @@ GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
|||
auto plug = std::make_unique<GStreamerImportPlugin>();
|
||||
|
||||
// No supported extensions...no gstreamer plugins installed
|
||||
if (plug->GetSupportedExtensions().GetCount() == 0)
|
||||
if (plug->GetSupportedExtensions().size() == 0)
|
||||
return;
|
||||
|
||||
// Add to list of importers
|
||||
|
@ -391,7 +391,7 @@ GStreamerImportPlugin::GetSupportedExtensions()
|
|||
wxString extension = wxString::FromUTF8(extensions[i]);
|
||||
if (mExtensions.Index(extension, false) == wxNOT_FOUND)
|
||||
{
|
||||
mExtensions.Add(extension);
|
||||
mExtensions.push_back(extension);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ GStreamerImportPlugin::GetSupportedExtensions()
|
|||
|
||||
// Log it for debugging
|
||||
wxString extensions = wxT("Extensions:");
|
||||
for (size_t i = 0; i < mExtensions.GetCount(); i++)
|
||||
for (size_t i = 0; i < mExtensions.size(); i++)
|
||||
{
|
||||
extensions = extensions + wxT(" ") + mExtensions[i];
|
||||
}
|
||||
|
@ -892,7 +892,7 @@ GStreamerImportFileHandle::~GStreamerImportFileHandle()
|
|||
wxInt32
|
||||
GStreamerImportFileHandle::GetStreamCount()
|
||||
{
|
||||
return mStreamInfo.GetCount();
|
||||
return mStreamInfo.size();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -991,7 +991,7 @@ GStreamerImportFileHandle::Init()
|
|||
wxString::FromUTF8(c->mType.get()),
|
||||
(int) c->mNumChannels,
|
||||
(int) c->mSampleRate);
|
||||
mStreamInfo.Add(strinfo);
|
||||
mStreamInfo.push_back(strinfo);
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
|
@ -382,7 +382,7 @@ void MP3ImportFileHandle::ImportID3(Tags *tags)
|
|||
v = UTF8CTOWX(str.get());
|
||||
}
|
||||
|
||||
if (!n.IsEmpty() && !v.IsEmpty()) {
|
||||
if (!n.empty() && !v.empty()) {
|
||||
tags->SetTag(n, v);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
{
|
||||
wxString strinfo;
|
||||
strinfo.Printf(wxT("Index[%02x] Version[%d], Channels[%d], Rate[%ld]"), (unsigned int) i,mVorbisFile->vi[i].version,mVorbisFile->vi[i].channels,mVorbisFile->vi[i].rate);
|
||||
mStreamInfo.Add(strinfo);
|
||||
mStreamInfo.push_back(strinfo);
|
||||
mStreamUsage[i] = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -692,7 +692,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
v = UTF8CTOWX(convStr.get());
|
||||
}
|
||||
|
||||
if (!n.IsEmpty() && !v.IsEmpty()) {
|
||||
if (!n.empty() && !v.empty()) {
|
||||
tags->SetTag(n, v);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -526,7 +526,7 @@ void QTImportFileHandle::AddMetadata(Tags *tags)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!v.IsEmpty()) {
|
||||
if (!v.empty()) {
|
||||
tags->SetTag(names[i].name, v);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ ImportRawDialog::ImportRawDialog(wxWindow * parent,
|
|||
|
||||
if (sf_format_check(&info)) {
|
||||
mEncodingSubtype[mNumEncodings] = subtype;
|
||||
encodings.Add(sf_encoding_index_name(i));
|
||||
encodings.push_back(sf_encoding_index_name(i));
|
||||
|
||||
if ((mEncoding & SF_FORMAT_SUBMASK) == subtype)
|
||||
selection = mNumEncodings;
|
||||
|
@ -387,7 +387,7 @@ ImportRawDialog::ImportRawDialog(wxWindow * parent,
|
|||
chans.Add(_("1 Channel (Mono)"));
|
||||
chans.Add(_("2 Channels (Stereo)"));
|
||||
for (i=2; i<16; i++) {
|
||||
chans.Add(wxString::Format(_("%d Channels"), i + 1));
|
||||
chans.push_back(wxString::Format(_("%d Channels"), i + 1));
|
||||
}
|
||||
|
||||
S.StartVerticalLay(false);
|
||||
|
|
|
@ -34,8 +34,8 @@ void DoExport
|
|||
|
||||
// Prompt for file name and/or extension?
|
||||
bool bPromptingRequired =
|
||||
(project.mBatchMode == 0) || project.GetFileName().IsEmpty() ||
|
||||
Format.IsEmpty();
|
||||
(project.mBatchMode == 0) || project.GetFileName().empty() ||
|
||||
Format.empty();
|
||||
wxString filename;
|
||||
|
||||
if (!bPromptingRequired) {
|
||||
|
@ -394,7 +394,7 @@ void OnImport(const CommandContext &context)
|
|||
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
|
||||
|
||||
wxArrayString selectedFiles = project.ShowOpenDialog(wxT(""));
|
||||
if (selectedFiles.GetCount() == 0) {
|
||||
if (selectedFiles.size() == 0) {
|
||||
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
|
||||
gPrefs->Flush();
|
||||
return;
|
||||
|
@ -418,7 +418,7 @@ void OnImport(const CommandContext &context)
|
|||
project.HandleResize(); // Adjust scrollers for NEW track sizes.
|
||||
} );
|
||||
|
||||
for (size_t ff = 0; ff < selectedFiles.GetCount(); ff++) {
|
||||
for (size_t ff = 0; ff < selectedFiles.size(); ff++) {
|
||||
wxString fileName = selectedFiles[ff];
|
||||
|
||||
FileNames::UpdateDefaultPath(FileNames::Operation::Open, fileName);
|
||||
|
|
|
@ -96,7 +96,7 @@ void OnAudioDeviceInfo(const CommandContext &context)
|
|||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&project);
|
||||
if (!fName.IsEmpty())
|
||||
if (!fName.empty())
|
||||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ void OnMidiDeviceInfo(const CommandContext &context)
|
|||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&project);
|
||||
if (!fName.IsEmpty())
|
||||
if (!fName.empty())
|
||||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
|
|
|
@ -44,11 +44,11 @@ bool CompareEffectsByPublisher(
|
|||
auto akey = em.GetVendorName(a->GetID());
|
||||
auto bkey = em.GetVendorName(b->GetID());
|
||||
|
||||
if (akey.IsEmpty())
|
||||
if (akey.empty())
|
||||
{
|
||||
akey = _("Uncategorized");
|
||||
}
|
||||
if (bkey.IsEmpty())
|
||||
if (bkey.empty())
|
||||
{
|
||||
bkey = _("Uncategorized");
|
||||
}
|
||||
|
@ -94,11 +94,11 @@ bool CompareEffectsByTypeAndName(
|
|||
auto akey = em.GetEffectFamilyName(a->GetID());
|
||||
auto bkey = em.GetEffectFamilyName(b->GetID());
|
||||
|
||||
if (akey.IsEmpty())
|
||||
if (akey.empty())
|
||||
{
|
||||
akey = _("Uncategorized");
|
||||
}
|
||||
if (bkey.IsEmpty())
|
||||
if (bkey.empty())
|
||||
{
|
||||
bkey = _("Uncategorized");
|
||||
}
|
||||
|
@ -127,11 +127,11 @@ bool CompareEffectsByType(const PluginDescriptor *a, const PluginDescriptor *b)
|
|||
auto akey = em.GetEffectFamilyName(a->GetID());
|
||||
auto bkey = em.GetEffectFamilyName(b->GetID());
|
||||
|
||||
if (akey.IsEmpty())
|
||||
if (akey.empty())
|
||||
{
|
||||
akey = _("Uncategorized");
|
||||
}
|
||||
if (bkey.IsEmpty())
|
||||
if (bkey.empty())
|
||||
{
|
||||
bkey = _("Uncategorized");
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void AddEffectMenuItems(
|
|||
if (groupBy == wxT("groupby:publisher"))
|
||||
{
|
||||
current = EffectManager::Get().GetVendorName(plug->GetID());
|
||||
if (current.IsEmpty())
|
||||
if (current.empty())
|
||||
{
|
||||
current = _("Unknown");
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ void AddEffectMenuItems(
|
|||
else if (groupBy == wxT("groupby:type"))
|
||||
{
|
||||
current = EffectManager::Get().GetEffectFamilyName(plug->GetID());
|
||||
if (current.IsEmpty())
|
||||
if (current.empty())
|
||||
{
|
||||
current = _("Unknown");
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ void AddEffectMenuItems(
|
|||
{
|
||||
using namespace MenuTable;
|
||||
BaseItemPtrs temp;
|
||||
bool bInSubmenu = !last.IsEmpty() && (groupNames.Count() > 1);
|
||||
bool bInSubmenu = !last.empty() && (groupNames.size() > 1);
|
||||
|
||||
AddEffectMenuItemGroup(temp,
|
||||
groupNames, vHasDialog,
|
||||
|
@ -223,25 +223,25 @@ void AddEffectMenuItems(
|
|||
( bInSubmenu ? last : wxString{} ), std::move( temp )
|
||||
) );
|
||||
|
||||
groupNames.Clear();
|
||||
groupNames.clear();
|
||||
vHasDialog.clear();
|
||||
groupPlugs.Clear();
|
||||
groupPlugs.clear();
|
||||
groupFlags.clear();
|
||||
last = current;
|
||||
}
|
||||
|
||||
groupNames.Add(name);
|
||||
groupNames.push_back(name);
|
||||
vHasDialog.push_back(hasDialog);
|
||||
groupPlugs.Add(plug->GetID());
|
||||
groupPlugs.push_back(plug->GetID());
|
||||
groupFlags.push_back(
|
||||
plug->IsEffectRealtime() ? realflags : batchflags);
|
||||
}
|
||||
|
||||
if (groupNames.GetCount() > 0)
|
||||
if (groupNames.size() > 0)
|
||||
{
|
||||
using namespace MenuTable;
|
||||
BaseItemPtrs temp;
|
||||
bool bInSubmenu = groupNames.Count() > 1;
|
||||
bool bInSubmenu = groupNames.size() > 1;
|
||||
|
||||
AddEffectMenuItemGroup(temp,
|
||||
groupNames, vHasDialog, groupPlugs, groupFlags, isDefault);
|
||||
|
@ -280,18 +280,18 @@ void AddEffectMenuItems(
|
|||
group = wxEmptyString;
|
||||
}
|
||||
|
||||
if (!group.IsEmpty())
|
||||
if (!group.empty())
|
||||
{
|
||||
group += wxT(": ");
|
||||
}
|
||||
|
||||
groupNames.Add(group + name);
|
||||
groupNames.push_back(group + name);
|
||||
vHasDialog.push_back(hasDialog);
|
||||
groupPlugs.Add(plug->GetID());
|
||||
groupPlugs.push_back(plug->GetID());
|
||||
groupFlags.push_back(plug->IsEffectRealtime() ? realflags : batchflags);
|
||||
}
|
||||
|
||||
if (groupNames.GetCount() > 0)
|
||||
if (groupNames.size() > 0)
|
||||
{
|
||||
AddEffectMenuItemGroup(
|
||||
table, groupNames, vHasDialog, groupPlugs, groupFlags, isDefault);
|
||||
|
@ -568,7 +568,7 @@ void OnManageEffects(const CommandContext &context)
|
|||
void OnRepeatLastEffect(const CommandContext &context)
|
||||
{
|
||||
auto lastEffect = GetMenuManager(context.project).mLastEffect;
|
||||
if (!lastEffect.IsEmpty())
|
||||
if (!lastEffect.empty())
|
||||
{
|
||||
DoEffect( lastEffect, context, kConfigured );
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ void AddEffectMenuItemGroup(
|
|||
const std::vector<CommandFlag> & flags,
|
||||
bool isDefault)
|
||||
{
|
||||
const int namesCnt = (int) names.GetCount();
|
||||
const int namesCnt = (int) names.size();
|
||||
int perGroup;
|
||||
|
||||
#if defined(__WXGTK__)
|
||||
|
@ -827,7 +827,7 @@ MenuTable::BaseItemPtrs PopulateMacrosMenu( CommandFlag flags )
|
|||
wxArrayString names = MacroCommands::GetNames();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int)names.GetCount(); i++) {
|
||||
for (i = 0; i < (int)names.size(); i++) {
|
||||
wxString MacroID = ApplyMacroDialog::MacroIdOfName( names[i] );
|
||||
result.push_back( MenuTable::Command( MacroID,
|
||||
names[i], false, FN(OnApplyMacroDirectly),
|
||||
|
@ -871,7 +871,7 @@ MenuTable::BaseItemPtr EffectMenu( AudacityProject &project )
|
|||
|
||||
const auto &lastEffect = GetMenuManager(project).mLastEffect;
|
||||
wxString buildMenuLabel;
|
||||
if (!lastEffect.IsEmpty()) {
|
||||
if (!lastEffect.empty()) {
|
||||
buildMenuLabel.Printf(_("Repeat %s"),
|
||||
EffectManager::Get().GetCommandName(lastEffect));
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ void ODFLACFile::metadata_callback(const FLAC__StreamMetadata *metadata)
|
|||
{
|
||||
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
|
||||
for (FLAC__uint32 i = 0; i < metadata->data.vorbis_comment.num_comments; i++) {
|
||||
mComments.Add(UTF8CTOWX((char *)metadata->data.vorbis_comment.comments[i].entry));
|
||||
mComments.push_back(UTF8CTOWX((char *)metadata->data.vorbis_comment.comments[i].entry));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -99,8 +99,8 @@ void DevicePrefs::GetNamesAndLabels()
|
|||
if ((info!=NULL)&&(info->maxOutputChannels > 0 || info->maxInputChannels > 0)) {
|
||||
wxString name = wxSafeConvertMB2WX(Pa_GetHostApiInfo(info->hostApi)->name);
|
||||
if (mHostNames.Index(name) == wxNOT_FOUND) {
|
||||
mHostNames.Add(name);
|
||||
mHostLabels.Add(name);
|
||||
mHostNames.push_back(name);
|
||||
mHostLabels.push_back(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -267,12 +267,12 @@ void DevicePrefs::OnHost(wxCommandEvent & e)
|
|||
|
||||
/* deal with not having any devices at all */
|
||||
if (mPlay->GetCount() == 0) {
|
||||
playnames.Add(_("No devices found"));
|
||||
playnames.push_back(_("No devices found"));
|
||||
mPlay->Append(playnames[0], (void *) NULL);
|
||||
mPlay->SetSelection(0);
|
||||
}
|
||||
if (mRecord->GetCount() == 0) {
|
||||
recordnames.Add(_("No devices found"));
|
||||
recordnames.push_back(_("No devices found"));
|
||||
mRecord->Append(recordnames[0], (void *) NULL);
|
||||
mRecord->SetSelection(0);
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ void DevicePrefs::OnDevice(wxCommandEvent & WXUNUSED(event))
|
|||
name = wxString::Format(wxT("%d"), i + 1);
|
||||
}
|
||||
|
||||
channelnames.Add(name);
|
||||
channelnames.push_back(name);
|
||||
int index = mChannels->Append(name);
|
||||
if (i == mRecordChannels - 1) {
|
||||
mChannels->SetSelection(index);
|
||||
|
|
|
@ -169,8 +169,8 @@ void DirectoriesPrefs::OnChooseTempDir(wxCommandEvent & e)
|
|||
// (that doesn't exist) -- hence the constructor calls
|
||||
if (tmpDirPath != wxFileName(wxGetApp().defaultTempDir, wxT("")) &&
|
||||
tmpDirPath != wxFileName(mTempDir->GetValue(), wxT("")) &&
|
||||
(dirsInPath.GetCount() == 0 ||
|
||||
dirsInPath[dirsInPath.GetCount()-1] != newDirName))
|
||||
(dirsInPath.size() == 0 ||
|
||||
dirsInPath[dirsInPath.size()-1] != newDirName))
|
||||
{
|
||||
tmpDirPath.AppendDir(newDirName);
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
|
|||
PluginList->DeleteAllItems();
|
||||
|
||||
int fcount;
|
||||
fcount = item->filters.Count();
|
||||
fcount = item->filters.size();
|
||||
int shift = 0;
|
||||
for (int i = 0; i < fcount; i++)
|
||||
{
|
||||
|
@ -493,14 +493,14 @@ void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event)
|
|||
switch (col)
|
||||
{
|
||||
case 0:
|
||||
item->extensions.Clear();
|
||||
item->extensions.clear();
|
||||
break;
|
||||
case 1:
|
||||
item->mime_types.Clear();
|
||||
item->mime_types.clear();
|
||||
break;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < vals.Count(); i++)
|
||||
for (size_t i = 0; i < vals.size(); i++)
|
||||
{
|
||||
|
||||
wxString trimmed = vals[i];
|
||||
|
@ -529,17 +529,17 @@ Audacity to trim spaces for you?"
|
|||
switch (col)
|
||||
{
|
||||
case 0:
|
||||
item->extensions.Add (trimmed);
|
||||
item->extensions.push_back(trimmed);
|
||||
break;
|
||||
case 1:
|
||||
item->mime_types.Add (trimmed);
|
||||
item->mime_types.push_back(trimmed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fixSpaces == wxYES)
|
||||
{
|
||||
wxString vals_as_string;
|
||||
for (size_t i = 0; i < vals.Count(); i++)
|
||||
for (size_t i = 0; i < vals.size(); i++)
|
||||
{
|
||||
if (i > 0)
|
||||
vals_as_string.Append (wxT(":"));
|
||||
|
@ -554,19 +554,19 @@ Audacity to trim spaces for you?"
|
|||
void ExtImportPrefs::AddItemToTable (int index, const ExtImportItem *item)
|
||||
{
|
||||
wxString extensions, mime_types;
|
||||
if (item->extensions.Count() > 0)
|
||||
if (item->extensions.size() > 0)
|
||||
{
|
||||
extensions.Append (item->extensions[0]);
|
||||
for (unsigned int i = 1; i < item->extensions.Count(); i++)
|
||||
for (unsigned int i = 1; i < item->extensions.size(); i++)
|
||||
{
|
||||
extensions.Append (wxT(":"));
|
||||
extensions.Append (item->extensions[i]);
|
||||
}
|
||||
}
|
||||
if (item->mime_types.Count() > 0)
|
||||
if (item->mime_types.size() > 0)
|
||||
{
|
||||
mime_types.Append (item->mime_types[0]);
|
||||
for (unsigned int i = 1; i < item->mime_types.Count(); i++)
|
||||
for (unsigned int i = 1; i < item->mime_types.size(); i++)
|
||||
{
|
||||
mime_types.Append (wxT(":"));
|
||||
mime_types.Append (item->mime_types[i]);
|
||||
|
|
|
@ -283,7 +283,7 @@ void KeyConfigPrefs::RefreshBindings(bool bSort)
|
|||
wxArrayString Categories;
|
||||
wxArrayString Prefixes;
|
||||
|
||||
mNames.Clear();
|
||||
mNames.clear();
|
||||
mKeys.clear();
|
||||
mDefaultKeys.clear();
|
||||
mStandardDefaultKeys.clear();
|
||||
|
@ -432,7 +432,7 @@ void KeyConfigPrefs::OnHotkeyChar(wxKeyEvent & WXUNUSED(e))
|
|||
|
||||
void KeyConfigPrefs::OnHotkeyKillFocus(wxFocusEvent & e)
|
||||
{
|
||||
if (mKey->GetValue().IsEmpty() && mCommandSelected != wxNOT_FOUND) {
|
||||
if (mKey->GetValue().empty() && mCommandSelected != wxNOT_FOUND) {
|
||||
mKey->AppendText(mView->GetKey(mCommandSelected).Display());
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ bool KeyConfigPrefs::Commit()
|
|||
PopulateOrExchange(S);
|
||||
|
||||
bool bFull = gPrefs->ReadBool(wxT("/GUI/Shortcuts/FullDefaults"), false);
|
||||
for (size_t i = 0; i < mNames.GetCount(); i++) {
|
||||
for (size_t i = 0; i < mNames.size(); i++) {
|
||||
const auto &dkey = bFull ? mDefaultKeys[i] : mStandardDefaultKeys[i];
|
||||
wxString name = wxT("/NewKeys/") + mNames[i];
|
||||
const auto &key = mNewKeys[i];
|
||||
|
@ -661,7 +661,7 @@ bool KeyConfigPrefs::Commit()
|
|||
void KeyConfigPrefs::Cancel()
|
||||
{
|
||||
// Restore original key values
|
||||
for (size_t i = 0; i < mNames.GetCount(); i++) {
|
||||
for (size_t i = 0; i < mNames.size(); i++) {
|
||||
mManager->SetKeyFromIndex(i, mKeys[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ void MidiIOPrefs::GetNamesAndLabels() {
|
|||
if (info->output || info->input) { //should always happen
|
||||
wxString name = wxSafeConvertMB2WX(info->interf);
|
||||
if (mHostNames.Index(name) == wxNOT_FOUND) {
|
||||
mHostNames.Add(name);
|
||||
mHostLabels.Add(name);
|
||||
mHostNames.push_back(name);
|
||||
mHostLabels.push_back(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
{
|
||||
wxString itemAtIndex;
|
||||
int index = mHost->GetCurrentSelection();
|
||||
if (index >= 0 && index < (int)mHostNames.Count())
|
||||
itemAtIndex = mHostNames.Item(index);
|
||||
if (index >= 0 && index < (int)mHostNames.size())
|
||||
itemAtIndex = mHostNames[index];
|
||||
int nDevices = Pm_CountDevices();
|
||||
|
||||
if (nDevices == 0) {
|
||||
|
@ -193,7 +193,7 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
|
||||
mPlay->Clear();
|
||||
#ifdef EXPERIMENTAL_MIDI_IN
|
||||
mRecord->Clear();
|
||||
mRecord->clear();
|
||||
#endif
|
||||
|
||||
wxArrayString playnames;
|
||||
|
@ -208,7 +208,7 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
interf,
|
||||
name);
|
||||
if (info->output) {
|
||||
playnames.Add(name);
|
||||
playnames.push_back(name);
|
||||
index = mPlay->Append(name, (void *) info);
|
||||
if (device == mPlayDevice) {
|
||||
mPlay->SetSelection(index);
|
||||
|
@ -216,7 +216,7 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
}
|
||||
#ifdef EXPERIMENTAL_MIDI_IN
|
||||
if (info->input) {
|
||||
recordnames.Add(name);
|
||||
recordnames.push_back(name);
|
||||
index = mRecord->Append(name, (void *) info);
|
||||
if (device == mRecordDevice) {
|
||||
mRecord->SetSelection(index);
|
||||
|
@ -227,12 +227,12 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
}
|
||||
|
||||
if (mPlay->GetCount() == 0) {
|
||||
playnames.Add(_("No devices found"));
|
||||
playnames.push_back(_("No devices found"));
|
||||
mPlay->Append(playnames[0], (void *) NULL);
|
||||
}
|
||||
#ifdef EXPERIMENTAL_MIDI_IN
|
||||
if (mRecord->GetCount() == 0) {
|
||||
recordnames.Add(_("No devices found"));
|
||||
if (mRecord->size() == 0) {
|
||||
recordnames.push_back(_("No devices found"));
|
||||
mRecord->Append(recordnames[0], (void *) NULL);
|
||||
}
|
||||
#endif
|
||||
|
@ -240,7 +240,7 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
|||
mPlay->SetSelection(0);
|
||||
}
|
||||
#ifdef EXPERIMENTAL_MIDI_IN
|
||||
if (mRecord->GetCount() && mRecord->GetSelection() == wxNOT_FOUND) {
|
||||
if (mRecord->size() && mRecord->GetSelection() == wxNOT_FOUND) {
|
||||
mRecord->SetSelection(0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -52,9 +52,9 @@ void ModulePrefs::GetAllModuleStatuses(){
|
|||
|
||||
// TODO: On an Audacity upgrade we should (?) actually untick modules.
|
||||
// The old modules might be still around, and we do not want to use them.
|
||||
mModules.Clear();
|
||||
mModules.clear();
|
||||
mStatuses.clear();
|
||||
mPaths.Clear();
|
||||
mPaths.clear();
|
||||
|
||||
|
||||
// Iterate through all Modules listed in prefs.
|
||||
|
@ -72,9 +72,9 @@ void ModulePrefs::GetAllModuleStatuses(){
|
|||
gPrefs->Write( str, iStatus );
|
||||
}
|
||||
//wxLogDebug( wxT("Entry: %s Value: %i"), str, iStatus );
|
||||
mModules.Add( str );
|
||||
mModules.push_back( str );
|
||||
mStatuses.push_back( iStatus );
|
||||
mPaths.Add( fname );
|
||||
mPaths.push_back( fname );
|
||||
}
|
||||
bCont = gPrefs->GetNextEntry(str, dummy);
|
||||
}
|
||||
|
@ -115,11 +115,11 @@ void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
|
|||
{
|
||||
S.StartMultiColumn( 2 );
|
||||
int i;
|
||||
for(i=0;i<(int)mModules.GetCount();i++)
|
||||
for(i=0;i<(int)mModules.size();i++)
|
||||
S.TieChoice( mModules[i], mStatuses[i], &StatusChoices );
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
if( mModules.GetCount() < 1 )
|
||||
if( mModules.size() < 1 )
|
||||
{
|
||||
S.AddFixedText( _("No modules were found") );
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ bool ModulePrefs::Commit()
|
|||
ShuttleGui S(this, eIsSavingToPrefs);
|
||||
PopulateOrExchange(S);
|
||||
int i;
|
||||
for(i=0;i<(int)mPaths.GetCount();i++)
|
||||
for(i=0;i<(int)mPaths.size();i++)
|
||||
SetModuleStatus( mPaths[i], mStatuses[i] );
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -152,10 +152,10 @@ void QualityPrefs::GetNamesAndLabels()
|
|||
for (int i = 0; i < AudioIO::NumStandardRates; i++) {
|
||||
int iRate = AudioIO::StandardRates[i];
|
||||
mSampleRateLabels.push_back(iRate);
|
||||
mSampleRateNames.Add(wxString::Format(wxT("%i Hz"), iRate));
|
||||
mSampleRateNames.push_back(wxString::Format(wxT("%i Hz"), iRate));
|
||||
}
|
||||
|
||||
mSampleRateNames.Add(_("Other..."));
|
||||
mSampleRateNames.push_back(_("Other..."));
|
||||
|
||||
// The label for the 'Other...' case can be any value at all.
|
||||
mSampleRateLabels.push_back(44100); // If chosen, this value will be overwritten
|
||||
|
@ -176,7 +176,7 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||
{
|
||||
// If the value in Prefs isn't in the list, then we want
|
||||
// the last item, 'Other...' to be shown.
|
||||
S.SetNoMatchSelector(mSampleRateNames.GetCount() - 1);
|
||||
S.SetNoMatchSelector(mSampleRateNames.size() - 1);
|
||||
// First the choice...
|
||||
// We make sure it uses the ID we want, so that we get changes
|
||||
S.Id(ID_SAMPLE_RATE_CHOICE);
|
||||
|
|
|
@ -83,25 +83,25 @@ enum {
|
|||
|
||||
void SpectrumPrefs::Populate(size_t windowSize)
|
||||
{
|
||||
mSizeChoices.Add(_("8 - most wideband"));
|
||||
mSizeChoices.Add(wxT("16"));
|
||||
mSizeChoices.Add(wxT("32"));
|
||||
mSizeChoices.Add(wxT("64"));
|
||||
mSizeChoices.Add(wxT("128"));
|
||||
mSizeChoices.Add(wxT("256"));
|
||||
mSizeChoices.Add(wxT("512"));
|
||||
mSizeChoices.Add(_("1024 - default"));
|
||||
mSizeChoices.Add(wxT("2048"));
|
||||
mSizeChoices.Add(wxT("4096"));
|
||||
mSizeChoices.Add(wxT("8192"));
|
||||
mSizeChoices.Add(wxT("16384"));
|
||||
mSizeChoices.Add(_("32768 - most narrowband"));
|
||||
mSizeChoices.push_back(_("8 - most wideband"));
|
||||
mSizeChoices.push_back(wxT("16"));
|
||||
mSizeChoices.push_back(wxT("32"));
|
||||
mSizeChoices.push_back(wxT("64"));
|
||||
mSizeChoices.push_back(wxT("128"));
|
||||
mSizeChoices.push_back(wxT("256"));
|
||||
mSizeChoices.push_back(wxT("512"));
|
||||
mSizeChoices.push_back(_("1024 - default"));
|
||||
mSizeChoices.push_back(wxT("2048"));
|
||||
mSizeChoices.push_back(wxT("4096"));
|
||||
mSizeChoices.push_back(wxT("8192"));
|
||||
mSizeChoices.push_back(wxT("16384"));
|
||||
mSizeChoices.push_back(_("32768 - most narrowband"));
|
||||
wxASSERT(mSizeChoices.size() == SpectrogramSettings::NumWindowSizes);
|
||||
|
||||
PopulatePaddingChoices(windowSize);
|
||||
|
||||
for (int i = 0; i < NumWindowFuncs(); i++) {
|
||||
mTypeChoices.Add(WindowFuncName(i));
|
||||
mTypeChoices.push_back(WindowFuncName(i));
|
||||
}
|
||||
|
||||
mScaleChoices = SpectrogramSettings::GetScaleNames();
|
||||
|
@ -140,7 +140,7 @@ void SpectrumPrefs::PopulatePaddingChoices(size_t windowSize)
|
|||
const size_t maxWindowSize = 1 << (SpectrogramSettings::LogMaxWindowSize);
|
||||
while (windowSize <= maxWindowSize) {
|
||||
const wxString numeral = wxString::Format(wxT("%d"), padding);
|
||||
mZeroPaddingChoices.Add(numeral);
|
||||
mZeroPaddingChoices.push_back(numeral);
|
||||
if (pPaddingSizeControl)
|
||||
pPaddingSizeControl->Append(numeral);
|
||||
windowSize <<= 1;
|
||||
|
|
|
@ -41,13 +41,13 @@ const wxChar *TracksBehaviorsPrefs::ScrollingPreferenceKey()
|
|||
|
||||
void TracksBehaviorsPrefs::Populate()
|
||||
{
|
||||
mSoloCodes.Add(wxT("Simple"));
|
||||
mSoloCodes.Add(wxT("Multi"));
|
||||
mSoloCodes.Add(wxT("None"));
|
||||
mSoloCodes.push_back(wxT("Simple"));
|
||||
mSoloCodes.push_back(wxT("Multi"));
|
||||
mSoloCodes.push_back(wxT("None"));
|
||||
|
||||
mSoloChoices.Add(_("Simple"));
|
||||
mSoloChoices.Add(_("Multi-track"));
|
||||
mSoloChoices.Add(_("None"));
|
||||
mSoloChoices.push_back(_("Simple"));
|
||||
mSoloChoices.push_back(_("Multi-track"));
|
||||
mSoloChoices.push_back(_("None"));
|
||||
|
||||
//------------------------- Main section --------------------
|
||||
// Now construct the GUI itself.
|
||||
|
|
|
@ -154,8 +154,8 @@ const wxArrayString &WaveformSettings::GetScaleNames()
|
|||
void Populate() override
|
||||
{
|
||||
// Keep in correspondence with enum WaveTrack::WaveTrackDisplay:
|
||||
mContents.Add(_("Linear"));
|
||||
mContents.Add(_("Logarithmic"));
|
||||
mContents.push_back(_("Linear"));
|
||||
mContents.push_back(_("Logarithmic"));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1190,14 +1190,14 @@ bool ControlToolBar::DoRecord(AudacityProject &project,
|
|||
}
|
||||
|
||||
if (useDateStamp) {
|
||||
if (!nameSuffix.IsEmpty()) {
|
||||
if (!nameSuffix.empty()) {
|
||||
nameSuffix += wxT("_");
|
||||
}
|
||||
nameSuffix += wxDateTime::Now().FormatISODate();
|
||||
}
|
||||
|
||||
if (useTimeStamp) {
|
||||
if (!nameSuffix.IsEmpty()) {
|
||||
if (!nameSuffix.empty()) {
|
||||
nameSuffix += wxT("_");
|
||||
}
|
||||
nameSuffix += wxDateTime::Now().FormatISOTime();
|
||||
|
@ -1206,10 +1206,10 @@ bool ControlToolBar::DoRecord(AudacityProject &project,
|
|||
// ISO standard would be nice, but ":" is unsafe for file name.
|
||||
nameSuffix.Replace(wxT(":"), wxT("-"));
|
||||
|
||||
if (baseTrackName.IsEmpty()) {
|
||||
if (baseTrackName.empty()) {
|
||||
newTrack->SetName(nameSuffix);
|
||||
}
|
||||
else if (nameSuffix.IsEmpty()) {
|
||||
else if (nameSuffix.empty()) {
|
||||
newTrack->SetName(baseTrackName);
|
||||
}
|
||||
else {
|
||||
|
@ -1389,7 +1389,7 @@ wxString ControlToolBar::StateForStatusBar()
|
|||
auto pProject = GetActiveProject();
|
||||
auto scrubState =
|
||||
pProject ? pProject->GetScrubber().GetUntranslatedStateString() : wxString();
|
||||
if (!scrubState.IsEmpty())
|
||||
if (!scrubState.empty())
|
||||
state = wxGetTranslation(scrubState);
|
||||
else if (mPlay->IsDown())
|
||||
state = wxGetTranslation(mStatePlay);
|
||||
|
|
|
@ -511,15 +511,15 @@ void DeviceToolBar::FillHosts()
|
|||
// go over our lists add the host to the list if it isn't there yet
|
||||
for (i = 0; i < inMaps.size(); i++)
|
||||
if (hosts.Index(inMaps[i].hostString) == wxNOT_FOUND)
|
||||
hosts.Add(inMaps[i].hostString);
|
||||
hosts.push_back(inMaps[i].hostString);
|
||||
for (i = 0; i < outMaps.size(); i++)
|
||||
if (hosts.Index(outMaps[i].hostString) == wxNOT_FOUND)
|
||||
hosts.Add(outMaps[i].hostString);
|
||||
hosts.push_back(outMaps[i].hostString);
|
||||
|
||||
mHost->Clear();
|
||||
mHost->Append(hosts);
|
||||
|
||||
if (hosts.GetCount() == 0)
|
||||
if (hosts.size() == 0)
|
||||
mHost->Enable(false);
|
||||
|
||||
mHost->InvalidateBestSize();
|
||||
|
|
|
@ -250,7 +250,7 @@ void SelectionBar::Populate()
|
|||
// the control that gets the focus events. So we have to find the
|
||||
// textctrl.
|
||||
wxWindowList kids = mRateBox->GetChildren();
|
||||
for (unsigned int i = 0; i < kids.GetCount(); i++) {
|
||||
for (unsigned int i = 0; i < kids.size(); i++) {
|
||||
wxClassInfo *ci = kids[i]->GetClassInfo();
|
||||
if (ci->IsKindOf(CLASSINFO(wxTextCtrl))) {
|
||||
mRateText = kids[i];
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue