Remove needless uses of wxString::c_str() in wxString::Format...

... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
This commit is contained in:
Paul Licameli 2017-10-09 01:03:14 -04:00
parent 0efbf6a190
commit 7fd78183d2
76 changed files with 500 additions and 504 deletions

View File

@ -802,7 +802,7 @@ bool AudacityApp::MRUOpen(const wxString &fullPathStr) {
else {
// File doesn't exist - remove file from history
AudacityMessageBox(wxString::Format(_("%s could not be found.\n\nIt has been removed from the list of recent files."),
fullPathStr.c_str()));
fullPathStr));
return(false);
}
}
@ -906,7 +906,7 @@ The first detected missing file is:\n\
%s\n\
There may be additional missing files.\n\
Choose File > Check Dependencies to view a list of \
locations of the missing files."), missingFileName.c_str());
locations of the missing files."), missingFileName);
// if an old dialog exists, raise it if it is
if (offendingProject->GetMissingAliasFileDialog()) {
@ -1146,7 +1146,7 @@ void AudacityApp::GenerateCrashReport(wxDebugReport::Context ctx)
dlg.ShowModal();
wxLogMessage(wxT("Report generated to: %s"),
rpt.GetCompressedFileName().c_str());
rpt.GetCompressedFileName());
rpt.Reset();
}
@ -1278,7 +1278,7 @@ bool AudacityApp::OnInit()
wxString home = wxGetHomeDir();
/* On Unix systems, the default temp dir is in /var/tmp. */
defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId().c_str());
defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId());
// DA: Path env variable.
#ifndef EXPERIMENTAL_DA
@ -1292,7 +1292,7 @@ bool AudacityApp::OnInit()
#ifdef AUDACITY_NAME
AddUniquePathToPathList(wxString::Format(wxT("%s/.%s-files"),
home.c_str(), wxT(AUDACITY_NAME)),
home, wxT(AUDACITY_NAME)),
audacityPathList);
AddUniquePathToPathList(wxString::Format(wxT("%s/share/%s"),
wxT(INSTALL_PREFIX), wxT(AUDACITY_NAME)),
@ -1302,7 +1302,7 @@ bool AudacityApp::OnInit()
audacityPathList);
#else //AUDACITY_NAME
AddUniquePathToPathList(wxString::Format(wxT("%s/.audacity-files"),
home.c_str()),
home),
audacityPathList);
AddUniquePathToPathList(wxString::Format(wxT("%s/share/audacity"),
wxT(INSTALL_PREFIX)),
@ -1345,7 +1345,7 @@ bool AudacityApp::OnInit()
// See bug #1271 for explanation of location
tmpDirLoc = FileNames::MkDir(wxStandardPaths::Get().GetUserLocalDataDir());
defaultTempDir.Printf(wxT("%s\\SessionData"),
tmpDirLoc.c_str());
tmpDirLoc);
#endif //__WXWSW__
#ifdef __WXMAC__
@ -1364,11 +1364,11 @@ bool AudacityApp::OnInit()
// JKC Bug 1220: Using an actual temp directory for session data on Mac was
// wrong because it would get cleared out on a reboot.
defaultTempDir.Printf(wxT("%s/Library/Application Support/audacity/SessionData"),
tmpDirLoc.c_str());
tmpDirLoc);
//defaultTempDir.Printf(wxT("%s/audacity-%s"),
// tmpDirLoc.c_str(),
// wxGetUserId().c_str());
// tmpDirLoc,
// wxGetUserId());
#endif //__WXMAC__
// Define languanges for which we have translations, but that are not yet
@ -1799,7 +1799,7 @@ bool AudacityApp::InitTempDir()
bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
{
wxString name = wxString::Format(wxT("audacity-lock-%s"), wxGetUserId().c_str());
wxString name = wxString::Format(wxT("audacity-lock-%s"), wxGetUserId());
mChecker.reset();
auto checker = std::make_unique<wxSingleInstanceChecker>();
@ -1895,7 +1895,7 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
{
// Send the filename
wxString param = parser->GetParam(i);
sock->WriteMsg((const wxChar *) param.c_str(), (param.Len() + 1) * sizeof(wxChar));
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
}
return false;

View File

@ -427,7 +427,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
int minute = now.GetMinute();
int second = now.GetSecond();
justName = wxString::Format(wxT("%d-%s-%02d-%02d-%02d-%02d"),
year, monthName.c_str(), dom, hour, minute, second);
year, monthName, dom, hour, minute, second);
// SetName(cleanedFileName);
// bool isStereo;
@ -436,7 +436,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
//OnSelectAll();
pathName = FileNames::FindDefaultPath(FileNames::Operation::Export);
::AudacityMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"),
pathName.c_str(), cleanedString.c_str(), justName.c_str(), extension.c_str()),
pathName, cleanedString, justName, extension),
_("Export recording"),
wxOK | wxCENTRE);
pathName += wxFileName::GetPathSeparator();
@ -585,7 +585,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString &
return false;
#endif
}
AudacityMessageBox(wxString::Format(_("Command %s not implemented yet"),command.c_str()));
AudacityMessageBox(wxString::Format(_("Command %s not implemented yet"),command));
return false;
}
// end CLEANSPEECH remnant
@ -641,7 +641,7 @@ bool BatchCommands::ApplyCommand(const wxString & command, const wxString & para
AudacityMessageBox(
wxString::Format(
_("Your batch command of %s was not recognized."), command.c_str() ));
_("Your batch command of %s was not recognized."), command ));
return false;
}
@ -703,8 +703,8 @@ bool BatchCommands::ApplyChain(const wxString & filename)
else
{
/* i18n-hint: active verb in past tense */
longDesc = wxString::Format(_("Applied batch chain '%s'"), name.c_str());
shortDesc = wxString::Format(_("Apply '%s'"), name.c_str());
longDesc = wxString::Format(_("Applied batch chain '%s'"), name);
shortDesc = wxString::Format(_("Apply '%s'"), name);
}
if (!proj)
@ -762,12 +762,12 @@ bool BatchCommands::ReportAndSkip(const wxString & command, const wxString & par
//TODO: Add a cancel button to these, and add the logic so that we can abort.
if( params != wxT("") )
{
AudacityMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command.c_str(), params.c_str()),
AudacityMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command, params),
_("Test Mode"));
}
else
{
AudacityMessageBox( wxString::Format(_("Apply %s"),command.c_str()),
AudacityMessageBox( wxString::Format(_("Apply %s"),command),
_("Test Mode"));
}
return true;

View File

@ -165,7 +165,7 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
{
S.SetBorder(20);
S.AddFixedText(wxString::Format(_("Applying '%s' to current project"),
name.c_str()));
name));
}
S.EndStatic();
}
@ -642,7 +642,7 @@ bool EditChainsDialog::ChangeOK()
wxString msg;
int id;
title.Printf(_("%s changed"), mActiveChain.c_str());
title.Printf(_("%s changed"), mActiveChain);
msg = _("Do you want to save the changes?");
id = AudacityMessageBox(msg, title, wxYES_NO | wxCANCEL);
@ -833,7 +833,7 @@ void EditChainsDialog::OnRemove(wxCommandEvent & WXUNUSED(event))
wxString name = mChains->GetItemText(item);
AudacityMessageDialog m(this,
/*i18n-hint: %s will be replaced by the name of a file.*/
wxString::Format(_("Are you sure you want to delete %s?"), name.c_str()),
wxString::Format(_("Are you sure you want to delete %s?"), name),
GetTitle(),
wxYES_NO | wxICON_QUESTION);
if (m.ShowModal() == wxID_NO) {

View File

@ -62,7 +62,7 @@ out.
#ifdef DEBUG_BLOCKFILE
#define BLOCKFILE_DEBUG_OUTPUT(op, i) \
wxPrintf(wxT("[BlockFile %x %s] %s: %i\n"), (unsigned)this, \
mFileName.GetFullName().c_str(), wxT(op), i);
mFileName.GetFullName(), wxT(op), i);
#else
#define BLOCKFILE_DEBUG_OUTPUT(op, i)
#endif
@ -693,7 +693,7 @@ void AliasBlockFile::WriteSummary()
// Never silence the Log w.r.t write errors; they always count
// as NEW errors
wxLogError(wxT("Unable to write summary data to file %s"),
mFileName.GetFullPath().c_str());
mFileName.GetFullPath());
// If we can't write, there's nothing to do.
return;
}

View File

@ -314,7 +314,7 @@ static void RecursivelyRemove(wxArrayString& filePathArray, int count, int bias,
auto nn = filePathArray.size();
for (unsigned int i = 0; i < nn; i++) {
const wxChar *file = filePathArray[i].c_str();
const wxChar *file = filePathArray[i];
if (bFiles)
::wxRemoveFile(file);
if (bDirs) {
@ -768,14 +768,14 @@ bool DirManager::AssignFile(wxFileNameWrapper &fileName,
// set to true only if called from MakeFileBlockName().
wxString filespec;
filespec.Printf(wxT("%s.*"),value.c_str());
filespec.Printf(wxT("%s.*"),value);
if(checkit.HasFiles(filespec)){
// collision with on-disk state!
wxString collision;
checkit.GetFirst(&collision,filespec);
wxLogWarning(_("Audacity found an orphan block file: %s. \nPlease consider saving and reloading the project to perform a complete project check."),
collision.c_str());
collision);
return FALSE;
}
@ -844,7 +844,7 @@ void DirManager::BalanceFileAdd(int midkey)
void DirManager::BalanceInfoAdd(const wxString &file)
{
const wxChar *s=file.c_str();
const wxChar *s=file;
if(s[0]==wxT('e')){
// this is one of the modern two-deep managed files
// convert filename to keys
@ -899,7 +899,7 @@ void DirManager::BalanceInfoDel(const wxString &file)
auto &dirTopPool = balanceInfo.dirTopPool;
auto &dirTopFull = balanceInfo.dirTopFull;
const wxChar *s=file.c_str();
const wxChar *s=file;
if(s[0]==wxT('e')){
// this is one of the modern two-deep managed files
@ -1419,7 +1419,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
/* i18n-hint: This is the pattern for filenames that are created
* when a file needs to be backed up to a different name. For
* example, mysong would become mysong-old1, mysong-old2, etc. */
renamedFileName.SetName(wxString::Format(_("%s-old%d"), fName.GetName().c_str(), i));
renamedFileName.SetName(wxString::Format(_("%s-old%d"), fName.GetName(), i));
} while (renamedFileName.FileExists());
// Test creating a file by that name to make sure it will
@ -1430,7 +1430,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
if (!testFile.IsOpened()) {
{ // need braces to avoid compiler warning about ambiguous else, see the macro
wxLogSysError(_("Unable to open/create test file."),
renamedFullPath.c_str());
renamedFullPath);
}
return false;
}
@ -1442,12 +1442,12 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
/* i18n-hint: %s is the name of a file.*/
{ // need braces to avoid compiler warning about ambiguous else, see the macro
wxLogSysError(_("Unable to remove '%s'."),
renamedFullPath.c_str());
renamedFullPath);
}
return false;
}
wxPrintf(_("Renamed file: %s\n"), renamedFullPath.c_str());
wxPrintf(_("Renamed file: %s\n"), renamedFullPath);
// Go through our block files and see if any indeed point to
// the file we're concerned about. If so, point the block file
@ -1497,8 +1497,8 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
// Print error message and cancel the export
wxLogSysError(_("Unable to rename '%s' to '%s'."),
fullPath.c_str(),
renamedFullPath.c_str());
fullPath,
renamedFullPath);
// Destruction of readLocks puts things back where they were
return false;
@ -1518,7 +1518,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
{
ab->ChangeAliasedFileName(wxFileNameWrapper{ renamedFileName });
wxPrintf(_("Changed block %s to new alias name\n"),
b->GetFileName().name.GetFullName().c_str());
b->GetFileName().name.GetFullName());
}
else if (!b->IsDataAvailable() && db->GetEncodedAudioFilename() == fName) {
@ -1622,7 +1622,7 @@ _("Project check of \"%s\" folder \
\nproject in its current state, unless you \"Close \
\nproject immediately\" on further error alerts.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), (long long) missingAliasedFilePathHash.size());
msg.Printf(msgA, this->projName, (long long) missingAliasedFilePathHash.size());
const wxChar *buttons[] =
{_("Close project immediately with no changes"),
_("Treat missing audio as silence (this session only)"),
@ -1700,7 +1700,7 @@ _("Project check of \"%s\" folder \
\nAudacity can fully regenerate these files \
\nfrom the current audio in the project.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), (long long) missingAUFHash.size());
msg.Printf(msgA, this->projName, (long long) missingAUFHash.size());
const wxChar *buttons[] = {_("Regenerate alias summary files (safe and recommended)"),
_("Fill in silence for missing display data (this session only)"),
_("Close project immediately with no further changes"),
@ -1772,7 +1772,7 @@ _("Project check of \"%s\" folder \
\n\nNote that for the second option, the waveform \
\nmay not show silence.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), (long long) missingAUHash.size());
msg.Printf(msgA, this->projName, (long long) missingAUHash.size());
const wxChar *buttons[] =
{_("Close project immediately with no further changes"),
_("Treat missing audio as silence (this session only)"),
@ -1844,7 +1844,7 @@ _("Project check of \"%s\" folder \
other projects. \
\nThey are doing no harm and are small.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), (int)orphanFilePathArray.GetCount());
msg.Printf(msgA, this->projName, (int)orphanFilePathArray.GetCount());
const wxChar *buttons[] =
{_("Continue without deleting; ignore the extra files this session"),
@ -1937,7 +1937,7 @@ void DirManager::FindMissingAliasedFiles(
iter = missingAliasedFilePathHash.begin();
while (iter != missingAliasedFilePathHash.end())
{
wxLogWarning(_("Missing aliased audio file: '%s'"), iter->first.c_str());
wxLogWarning(_("Missing aliased audio file: '%s'"), iter->first);
++iter;
}
}
@ -1962,7 +1962,7 @@ void DirManager::FindMissingAUFs(
{
missingAUFHash[key] = b;
wxLogWarning(_("Missing alias (.auf) block file: '%s'"),
fileName.GetFullPath().c_str());
fileName.GetFullPath());
}
}
}
@ -1989,8 +1989,7 @@ void DirManager::FindMissingAUs(
wxFile{ path }.Length() == 0)
{
missingAUHash[key] = b;
wxLogWarning(_("Missing data block file: '%s'"),
path.c_str());
wxLogWarning(_("Missing data block file: '%s'"), path);
}
}
}
@ -2033,7 +2032,7 @@ void DirManager::FindOrphanBlockFiles(
}
}
for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
wxLogWarning(_("Orphan block file: '%s'"), orphanFilePathArray[i].c_str());
wxLogWarning(_("Orphan block file: '%s'"), orphanFilePathArray[i]);
}

View File

@ -133,7 +133,7 @@ void av_log_wx_callback(void* ptr, int level, const char* fmt, va_list vl)
wxString printstring(wxT(""));
if (avc) {
printstring.Append(wxString::Format(wxT("[%s @ %p] "), wxString::FromUTF8(avc->item_name(ptr)).c_str(), avc));
printstring.Append(wxString::Format(wxT("[%s @ %p] "), wxString::FromUTF8(avc->item_name(ptr)), avc));
}
wxString frm(fmt,wxConvLibc);
@ -162,7 +162,7 @@ void av_log_wx_callback(void* ptr, int level, const char* fmt, va_list vl)
wxPrintf("%s: %s\n",(char*)cpt.char_str(),(char*)printstring.char_str());
else
#endif
wxLogDebug(wxT("%s: %s"),cpt.c_str(),printstring.c_str());
wxLogDebug(wxT("%s: %s"),cpt,printstring);
}
//======================= Unicode aware uri protocol for FFmpeg
@ -473,13 +473,13 @@ public:
S.SetBorder(10);
S.StartVerticalLay(true);
{
text.Printf(_("Audacity needs the file '%s' to import and export audio via FFmpeg."), mName.c_str());
text.Printf(_("Audacity needs the file '%s' to import and export audio via FFmpeg."), mName);
S.AddTitle(text);
S.SetBorder(3);
S.StartHorizontalLay(wxALIGN_LEFT, true);
{
text.Printf(_("Location of '%s':"), mName.c_str());
text.Printf(_("Location of '%s':"), mName);
S.AddTitle(text);
}
S.EndHorizontalLay();
@ -488,7 +488,7 @@ public:
S.SetStretchyCol(0);
{
if (mLibPath.GetFullPath().IsEmpty()) {
text.Printf(_("To find '%s', click here -->"), mName.c_str());
text.Printf(_("To find '%s', click here -->"), mName);
mPathText = S.AddTextBox(wxT(""), text, 0);
}
else {
@ -518,7 +518,7 @@ public:
/* i18n-hint: It's asking for the location of a file, for
example, "Where is lame_enc.dll?" - you could translate
"Where would I find the file '%s'?" instead if you want. */
question.Printf(_("Where is '%s'?"), mName.c_str());
question.Printf(_("Where is '%s'?"), mName);
wxString path = FileNames::SelectFile(FileNames::Operation::_None,
question,
@ -598,7 +598,7 @@ bool FFmpegLibs::FindLibs(wxWindow *parent)
wxLogMessage(wxT("Looking for FFmpeg libraries..."));
if (!mLibAVFormatPath.IsEmpty()) {
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty."), mLibAVFormatPath.c_str());
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty."), mLibAVFormatPath);
const wxFileName fn{ mLibAVFormatPath };
path = fn.GetPath();
name = fn.GetFullName();
@ -607,7 +607,7 @@ bool FFmpegLibs::FindLibs(wxWindow *parent)
path = GetLibAVFormatPath();
name = GetLibAVFormatName();
wxLogMessage(wxT("mLibAVFormatPath is empty, starting with path '%s', name '%s'."),
path.c_str(), name.c_str());
path, name);
}
FindFFmpegDialog fd(parent,
@ -622,7 +622,7 @@ bool FFmpegLibs::FindLibs(wxWindow *parent)
path = fd.GetLibPath();
wxLogMessage(wxT("User-specified path = '%s'"), path.c_str());
wxLogMessage(wxT("User-specified path = '%s'"), path);
if (!::wxFileExists(path)) {
wxLogError(wxT("User-specified file does not exist. Failed to find FFmpeg libraries."));
return false;
@ -650,7 +650,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
// First try loading it from a previously located path
if (!mLibAVFormatPath.IsEmpty()) {
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty. Loading from it."),mLibAVFormatPath.c_str());
wxLogMessage(wxT("mLibAVFormatPath ('%s') is not empty. Loading from it."),mLibAVFormatPath);
mLibsLoaded = InitLibs(mLibAVFormatPath,showerr);
}
@ -658,7 +658,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
if (!mLibsLoaded && !GetLibAVFormatPath().IsEmpty()) {
const wxFileName fn{ GetLibAVFormatPath(), GetLibAVFormatName() };
wxString path = fn.GetFullPath();
wxLogMessage(wxT("Trying to load FFmpeg libraries from default path, '%s'."), path.c_str());
wxLogMessage(wxT("Trying to load FFmpeg libraries from default path, '%s'."), path);
mLibsLoaded = InitLibs(path,showerr);
if (mLibsLoaded) {
mLibAVFormatPath = path;
@ -670,7 +670,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
if (!mLibsLoaded && !GetLibAVFormatPath().IsEmpty()) {
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.c_str());
wxLogMessage(wxT("Trying to load FFmpeg libraries from legacy path, '%s'."), path);
mLibsLoaded = InitLibs(path,showerr);
if (mLibsLoaded) {
mLibAVFormatPath = path;
@ -681,7 +681,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
// If not successful, try loading using system search paths
if (!ValidLibsLoaded()) {
wxString path = GetLibAVFormatName();
wxLogMessage(wxT("Trying to load FFmpeg libraries from system paths. File name is '%s'."), path.c_str());
wxLogMessage(wxT("Trying to load FFmpeg libraries from system paths. File name is '%s'."), path);
mLibsLoaded = InitLibs(path,showerr);
if (mLibsLoaded) {
mLibAVFormatPath = path;
@ -730,31 +730,31 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
// First take PATH environment variable and store its content.
if (wxGetEnv(wxT("PATH"),&syspath))
{
wxLogMessage(wxT("PATH = '%s'"), syspath.c_str());
wxLogMessage(wxT("PATH = '%s'"), syspath);
const wxString &fmtdir{ wxPathOnly(libpath_format) };
wxString fmtdirsc = fmtdir + wxT(";");
wxString scfmtdir = wxT(";") + fmtdir;
wxLogMessage(wxT("Checking that '%s' is in PATH..."), fmtdir.c_str());
wxLogMessage(wxT("Checking that '%s' is in PATH..."), fmtdir);
// If the directory, where libavformat is, is not in PATH - add it
if (!syspath.Contains(fmtdirsc) && !syspath.Contains(scfmtdir) && !syspath.Contains(fmtdir))
{
wxLogWarning(wxT("FFmpeg directory '%s' is not in PATH."), fmtdir.c_str());
wxLogWarning(wxT("FFmpeg directory '%s' is not in PATH."), fmtdir);
if (syspath.Left(1) == wxT(';'))
{
wxLogMessage(wxT("Temporarily preending '%s' to PATH..."), fmtdir.c_str());
wxLogMessage(wxT("Temporarily prepending '%s' to PATH..."), fmtdir);
syspath.Prepend(scfmtdir);
}
else
{
wxLogMessage(wxT("Temporarily prepending '%s' to PATH..."), scfmtdir.c_str());
wxLogMessage(wxT("Temporarily prepending '%s' to PATH..."), scfmtdir);
syspath.Prepend(fmtdirsc);
}
if (wxSetEnv(wxT("PATH"),syspath.c_str()))
if (wxSetEnv(wxT("PATH"),syspath))
// Remember to change PATH back to normal after we're done
pathfix = true;
else
wxLogSysError(wxT("Setting PATH via wxSetEnv('%s') failed."),syspath.c_str());
wxLogSysError(wxT("Setting PATH via wxSetEnv('%s') failed."),syspath);
}
else
{
@ -779,7 +779,7 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
// Check for a monolithic avformat
avformat = std::make_unique<wxDynamicLibrary>();
wxLogMessage(wxT("Checking for monolithic avformat from '%s'."), nameFull.c_str());
wxLogMessage(wxT("Checking for monolithic avformat from '%s'."), nameFull);
gotError = !avformat->Load(nameFull, wxDL_LAZY);
// Verify it really is monolithic
@ -816,20 +816,20 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
if (!util) {
util = (avutil = std::make_unique<wxDynamicLibrary>()).get();
wxLogMessage(wxT("Loading avutil from '%s'."), avutil_filename_full.c_str());
wxLogMessage(wxT("Loading avutil from '%s'."), avutil_filename_full);
util->Load(avutil_filename_full, wxDL_LAZY);
}
if (!codec) {
codec = (avcodec = std::make_unique<wxDynamicLibrary>()).get();
wxLogMessage(wxT("Loading avcodec from '%s'."), avcodec_filename_full.c_str());
wxLogMessage(wxT("Loading avcodec from '%s'."), avcodec_filename_full);
codec->Load(avcodec_filename_full, wxDL_LAZY);
}
if (!avformat->IsLoaded()) {
name.SetFullName(libpath_format);
nameFull = name.GetFullPath();
wxLogMessage(wxT("Loading avformat from '%s'."), nameFull.c_str());
wxLogMessage(wxT("Loading avformat from '%s'."), nameFull);
gotError = !avformat->Load(nameFull, wxDL_LAZY);
}
@ -839,7 +839,7 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
{
wxString oldpath = syspath.BeforeLast(wxT(';'));
wxLogMessage(wxT("Returning PATH to previous setting..."));
wxSetEnv(wxT("PATH"),oldpath.c_str());
wxSetEnv(wxT("PATH"),oldpath);
}
#endif
@ -852,15 +852,15 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
// Show the actual libraries loaded
if (avutil) {
wxLogMessage(wxT("Actual avutil path %s"),
FileNames::PathFromAddr(avutil->GetSymbol(wxT("avutil_version"))).c_str());
FileNames::PathFromAddr(avutil->GetSymbol(wxT("avutil_version"))));
}
if (avcodec) {
wxLogMessage(wxT("Actual avcodec path %s"),
FileNames::PathFromAddr(avcodec->GetSymbol(wxT("avcodec_version"))).c_str());
FileNames::PathFromAddr(avcodec->GetSymbol(wxT("avcodec_version"))));
}
if (avformat) {
wxLogMessage(wxT("Actual avformat path %s"),
FileNames::PathFromAddr(avformat->GetSymbol(wxT("avformat_version"))).c_str());
FileNames::PathFromAddr(avformat->GetSymbol(wxT("avformat_version"))));
}
wxLogMessage(wxT("Importing symbols..."));
@ -935,14 +935,14 @@ bool FFmpegLibs::InitLibs(const wxString &libpath_format, bool WXUNUSED(showerr)
mAVUtilVersion = wxString::Format(wxT("%d.%d.%d"),avuver >> 16 & 0xFF, avuver >> 8 & 0xFF, avuver & 0xFF);
wxLogMessage(wxT(" AVCodec version 0x%06x - %s (built against 0x%06x - %s)"),
avcver, mAVCodecVersion.c_str(), LIBAVCODEC_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVCODEC_VERSION)).c_str());
avcver, mAVCodecVersion, LIBAVCODEC_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVCODEC_VERSION)));
wxLogMessage(wxT(" AVFormat version 0x%06x - %s (built against 0x%06x - %s)"),
avfver, mAVFormatVersion.c_str(), LIBAVFORMAT_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVFORMAT_VERSION)).c_str());
avfver, mAVFormatVersion, LIBAVFORMAT_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVFORMAT_VERSION)));
wxLogMessage(wxT(" AVUtil version 0x%06x - %s (built against 0x%06x - %s)"),
avuver,mAVUtilVersion.c_str(), LIBAVUTIL_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVUTIL_VERSION)).c_str());
avuver,mAVUtilVersion, LIBAVUTIL_VERSION_INT,
wxString::FromUTF8(AV_STRINGIFY(LIBAVUTIL_VERSION)));
int avcverdiff = (avcver >> 16 & 0xFF) - (int)(LIBAVCODEC_VERSION_MAJOR);
int avfverdiff = (avfver >> 16 & 0xFF) - (int)(LIBAVFORMAT_VERSION_MAJOR);

View File

@ -265,7 +265,7 @@ public:
///\return libavformat library version or empty string?
wxString GetLibraryVersion()
{
return wxString::Format(wxT("F(%s),C(%s),U(%s)"),mAVFormatVersion.c_str(),mAVCodecVersion.c_str(),mAVUtilVersion.c_str());
return wxString::Format(wxT("F(%s),C(%s),U(%s)"),mAVFormatVersion,mAVCodecVersion,mAVUtilVersion);
}
#if defined(__WXMSW__)

View File

@ -27,14 +27,14 @@ FileIO::FileIO(const wxString & name, FileIOMode mode)
if (mMode == FileIO::Input) {
mInputStream = std::make_unique<wxFFileInputStream>(mName);
if (mInputStream == NULL || !mInputStream->IsOk()) {
wxPrintf(wxT("Couldn't get input stream: %s\n"), name.c_str());
wxPrintf(wxT("Couldn't get input stream: %s\n"), name);
return;
}
}
else {
mOutputStream = std::make_unique<wxFFileOutputStream>(mName);
if (mOutputStream == NULL || !mOutputStream->IsOk()) {
wxPrintf(wxT("Couldn't get output stream: %s\n"), name.c_str());
wxPrintf(wxT("Couldn't get output stream: %s\n"), name);
return;
}
}

View File

@ -95,7 +95,7 @@ void FileNames::MakeNameUnique(wxArrayString &otherNames, wxFileName &newName)
int i=2;
wxString orig = newName.GetName();
do {
newName.SetName(wxString::Format(wxT("%s-%d"), orig.c_str(), i));
newName.SetName(wxString::Format(wxT("%s-%d"), orig, i));
i++;
} while (otherNames.Index(newName.GetFullName(), false) >= 0);
}

View File

@ -937,16 +937,16 @@ void FreqWindow::PlotPaint(wxPaintEvent & event)
if (mAlg == SpectrumAnalyst::Spectrum) {
xpitch = PitchName_Absolute(FreqToMIDInote(xPos));
peakpitch = PitchName_Absolute(FreqToMIDInote(bestpeak));
xp = xpitch.c_str();
pp = peakpitch.c_str();
xp = xpitch;
pp = peakpitch;
/* i18n-hint: The %d's are replaced by numbers, the %s by musical notes, e.g. A#*/
cursor.Printf(_("%d Hz (%s) = %d dB"), (int)(xPos + 0.5), xp, (int)(value + 0.5));
peak.Printf(_("%d Hz (%s) = %.1f dB"), (int)(bestpeak + 0.5), pp, bestValue);
} else if (xPos > 0.0 && bestpeak > 0.0) {
xpitch = PitchName_Absolute(FreqToMIDInote(1.0 / xPos));
peakpitch = PitchName_Absolute(FreqToMIDInote(1.0 / bestpeak));
xp = xpitch.c_str();
pp = peakpitch.c_str();
xp = xpitch;
pp = peakpitch;
/* i18n-hint: The %d's are replaced by numbers, the %s by musical notes, e.g. A#
* the %.4f are numbers, and 'sec' should be an abbreviation for seconds */
cursor.Printf(_("%.4f sec (%d Hz) (%s) = %f"),

View File

@ -402,7 +402,7 @@ 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.c_str()));
mTrackNames.Add(wxString::Format(wxT("%d - %s"), index, dflt));
}
// Return the track name
@ -638,7 +638,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
fName = FileNames::SelectFile(FileNames::Operation::Export,
_("Export Labels As:"),
wxEmptyString,
fName.c_str(),
fName,
wxT("txt"),
wxT("*.txt"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,

View File

@ -1331,9 +1331,9 @@ LabelStruct LabelStruct::Import(wxTextFile &file, int &index)
void LabelStruct::Export(wxTextFile &file) const
{
file.AddLine(wxString::Format(wxT("%s\t%s\t%s"),
Internat::ToString(getT0(), FLT_DIG).c_str(),
Internat::ToString(getT1(), FLT_DIG).c_str(),
title.c_str()
Internat::ToString(getT0(), FLT_DIG),
Internat::ToString(getT1(), FLT_DIG),
title
));
// Do we need more lines?
@ -1346,8 +1346,8 @@ void LabelStruct::Export(wxTextFile &file) const
// Write a \ character at the start of a second line,
// so that earlier versions of Audacity ignore it.
file.AddLine(wxString::Format(wxT("\\\t%s\t%s"),
Internat::ToString(f0, FLT_DIG).c_str(),
Internat::ToString(f1, FLT_DIG).c_str()
Internat::ToString(f0, FLT_DIG),
Internat::ToString(f1, FLT_DIG)
));
// Additional lines in future formats should also start with '\'.

View File

@ -128,10 +128,10 @@ void LangChoiceDialog::OnOk(wxCommandEvent & WXUNUSED(event))
/* i18n-hint: The %s's are replaced by translated and untranslated
* versions of language names. */
msg.Printf(_("The language you have chosen, %s (%s), is not the same as the system language, %s (%s)."),
mLangNames[ndx].c_str(),
mLang.c_str(),
sname.c_str(),
slang.c_str());
mLangNames[ndx],
mLang,
sname,
slang);
if (AudacityMessageBox(msg, _("Confirm"), wxYES_NO) == wxNO) {
return;
}

View File

@ -48,18 +48,18 @@ static bool TranslationExists(wxArrayString &audacityPathList, wxString code)
{
wxArrayString results;
wxGetApp().FindFilesInPathList(wxString::Format(wxT("%s/audacity.mo"),
code.c_str()),
code),
audacityPathList,
results);
#if defined(__WXMAC__)
wxGetApp().FindFilesInPathList(wxString::Format(wxT("%s.lproj/audacity.mo"),
code.c_str()),
code),
audacityPathList,
results);
#endif
wxGetApp().FindFilesInPathList(wxString::Format(wxT("%s/LC_MESSAGES/audacity.mo"),
code.c_str()),
code),
audacityPathList,
results);
@ -212,9 +212,9 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
tempHash[code] = name;
/* wxLogDebug(wxT("code=%s name=%s fullCode=%s name=%s -> %s"),
code.c_str(), localLanguageName[code].c_str(),
fullCode.c_str(), localLanguageName[fullCode].c_str(),
name.c_str());*/
code, localLanguageName[code],
fullCode, localLanguageName[fullCode],
name);*/
}
}

View File

@ -301,7 +301,7 @@ bool ConvertLegacyProjectFile(const wxFileName &filename)
xmlFile.EndTag(wxT("audacityproject"));
xmlFile.Commit();
::AudacityMessageBox(wxString::Format(_("Converted a 1.0 project file to the new format.\nThe old file has been saved as '%s'"), xmlFile.GetBackupName().c_str()),
::AudacityMessageBox(wxString::Format(_("Converted a 1.0 project file to the new format.\nThe old file has been saved as '%s'"), xmlFile.GetBackupName()),
_("Opening Audacity Project"));
return true;

View File

@ -1120,7 +1120,7 @@ void AudacityProject::CreateMenusAndCommands()
wxString buildMenuLabel;
if (!mLastEffect.IsEmpty()) {
buildMenuLabel.Printf(_("Repeat %s"),
EffectManager::Get().GetEffectName(mLastEffect).c_str());
EffectManager::Get().GetEffectName(mLastEffect));
}
else
buildMenuLabel.Printf(_("Repeat Last Effect"));
@ -1933,7 +1933,7 @@ void AudacityProject::ModifyUndoMenuItems()
GetUndoManager()->GetShortDescription(cur, &desc);
mCommandManager.Modify(wxT("Undo"),
wxString::Format(_("&Undo %s"),
desc.c_str()));
desc));
}
else {
mCommandManager.Modify(wxT("Undo"),
@ -1944,7 +1944,7 @@ void AudacityProject::ModifyUndoMenuItems()
GetUndoManager()->GetShortDescription(cur+1, &desc);
mCommandManager.Modify(wxT("Redo"),
wxString::Format(_("&Redo %s"),
desc.c_str()));
desc));
mCommandManager.Enable(wxT("Redo"), true);
}
else {
@ -4047,9 +4047,9 @@ void AudacityProject::MoveTrack(Track* target, MoveChoice choice)
/* i18n-hint: The direction of movement will be up, down, to top or to bottom.. */
wxString shortDesc = (_("Move Track"));
longDesc = (wxString::Format(wxT("%s '%s' %s"), longDesc.c_str(),
target->GetName().c_str(), direction.c_str()));
shortDesc = (wxString::Format(wxT("%s %s"), shortDesc.c_str(), direction.c_str()));
longDesc = (wxString::Format(wxT("%s '%s' %s"), longDesc,
target->GetName(), direction));
shortDesc = (wxString::Format(wxT("%s %s"), shortDesc, direction));
PushState(longDesc, shortDesc);
GetTrackPanel()->Refresh(false);
@ -4371,7 +4371,7 @@ bool AudacityProject::OnEffect(const PluginID & ID, int flags)
wxString lastEffectDesc;
/* i18n-hint: %s will be the name of the effect which will be
* repeated if this menu item is chosen */
lastEffectDesc.Printf(_("Repeat %s"), shortDesc.c_str());
lastEffectDesc.Printf(_("Repeat %s"), shortDesc);
mCommandManager.Modify(wxT("RepeatLastEffect"), lastEffectDesc);
}
}
@ -6894,7 +6894,7 @@ void AudacityProject::OnImportLabels()
mTracks->Add(std::move(newTrack));
PushState(wxString::
Format(_("Imported labels from '%s'"), fileName.c_str()),
Format(_("Imported labels from '%s'"), fileName),
_("Import Labels"));
ZoomAfterImport(nullptr);
@ -6934,7 +6934,7 @@ AudacityProject *AudacityProject::DoImportMIDI(
pTrack->SetSelected(true);
pProject->PushState(wxString::Format(_("Imported MIDI from '%s'"),
fileName.c_str()), _("Import MIDI"));
fileName), _("Import MIDI"));
pProject->ZoomAfterImport(pTrack);
pNewProject = nullptr;
@ -7050,7 +7050,7 @@ void AudacityProject::HandleMixAndRender(bool toNewTrack)
// Smart history/undo message
if (selectedCount==1) {
wxString msg;
msg.Printf(_("Rendered all audio in track '%s'"), firstName.c_str());
msg.Printf(_("Rendered all audio in track '%s'"), firstName);
/* i18n-hint: Convert the audio into a more usable form, so apply
* panning and amplification and write to some external file.*/
PushState(msg, _("Render"));
@ -7600,12 +7600,12 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
if (moveSel) {
mViewInfo.selectedRegion.move(delta);
action = wxString::Format(_("Aligned/Moved %s"), action.c_str());
shortAction = wxString::Format(_("Align %s/Move"),shortAction.c_str());
action = wxString::Format(_("Aligned/Moved %s"), action);
shortAction = wxString::Format(_("Align %s/Move"),shortAction);
PushState(action, shortAction);
} else {
action = wxString::Format(_("Aligned %s"), action.c_str());
shortAction = wxString::Format(_("Align %s"),shortAction.c_str());
action = wxString::Format(_("Aligned %s"), action);
shortAction = wxString::Format(_("Align %s"),shortAction);
PushState(action, shortAction);
}

View File

@ -116,8 +116,8 @@ bool Module::Load()
tVersionFn versionFn = (tVersionFn)(mLib->GetSymbol(wxT(versionFnName)));
if (versionFn == NULL){
wxString ShortName = wxFileName( mName ).GetName();
AudacityMessageBox(wxString::Format(_("The module %s does not provide a version string.\nIt will not be loaded."), ShortName.c_str()), _("Module Unsuitable"));
wxLogMessage(wxString::Format(_("The module %s does not provide a version string. It will not be loaded."), mName.c_str()));
AudacityMessageBox(wxString::Format(_("The module %s does not provide a version string.\nIt will not be loaded."), ShortName), _("Module Unsuitable"));
wxLogMessage(wxString::Format(_("The module %s does not provide a version string. It will not be loaded."), mName));
mLib->Unload();
return false;
}
@ -125,8 +125,8 @@ bool Module::Load()
wxString moduleVersion = versionFn();
if( !moduleVersion.IsSameAs(AUDACITY_VERSION_STRING)) {
wxString ShortName = wxFileName( mName ).GetName();
AudacityMessageBox(wxString::Format(_("The module %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName.c_str(), moduleVersion.c_str()), _("Module Unsuitable"));
wxLogMessage(wxString::Format(_("The module %s is matched with Audacity version %s. It will not be loaded."), mName.c_str(), moduleVersion.c_str()));
AudacityMessageBox(wxString::Format(_("The module %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName, moduleVersion), _("Module Unsuitable"));
wxLogMessage(wxString::Format(_("The module %s is matched with Audacity version %s. It will not be loaded."), mName, moduleVersion));
mLib->Unload();
return false;
}
@ -268,7 +268,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
{
wxString ShortName = wxFileName( files[i] ).GetName();
wxString msg;
msg.Printf(_("Module \"%s\" found."), ShortName.c_str());
msg.Printf(_("Module \"%s\" found."), ShortName);
msg += _("\n\nOnly use modules from trusted sources");
const wxChar *buttons[] = {_("Yes"), _("No"), NULL}; // could add a button here for 'yes and remember that', and put it into the cfg file. Needs more thought.
int action;

View File

@ -963,7 +963,7 @@ void PluginRegistrationDialog::OnOK(wxCommandEvent & WXUNUSED(evt))
mLongestPath + wxT("\n");
wxString msg;
msg.Printf(_("Enabling effects:\n\n%s"), last3.c_str());
msg.Printf(_("Enabling effects:\n\n%s"), last3);
// Make sure the progress dialog is deleted before we call EndModal() or
// we will leave the project window in an unusable state on OSX.
@ -981,7 +981,7 @@ void PluginRegistrationDialog::OnOK(wxCommandEvent & WXUNUSED(evt))
if (item.state == STATE_Enabled && item.plugs[0]->GetPluginType() == PluginTypeStub)
{
last3 = last3.AfterFirst(wxT('\n')) + item.path + wxT("\n");
auto status = progress.Update(++i, enableCount, wxString::Format(_("Enabling effect:\n\n%s"), last3.c_str()));
auto status = progress.Update(++i, enableCount, wxString::Format(_("Enabling effect:\n\n%s"), last3));
if (status == ProgressResult::Cancelled)
{
break;
@ -2588,31 +2588,31 @@ IdentInterface *PluginManager::GetInstance(const PluginID & ID)
PluginID PluginManager::GetID(ModuleInterface *module)
{
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
GetPluginTypeString(PluginTypeModule).c_str(),
GetPluginTypeString(PluginTypeModule),
wxEmptyString,
module->GetVendor().c_str(),
module->GetName().c_str(),
module->GetPath().c_str());
module->GetVendor(),
module->GetName(),
module->GetPath());
}
PluginID PluginManager::GetID(EffectIdentInterface *effect)
{
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
GetPluginTypeString(PluginTypeEffect).c_str(),
effect->GetFamily().c_str(),
effect->GetVendor().c_str(),
effect->GetName().c_str(),
effect->GetPath().c_str());
GetPluginTypeString(PluginTypeEffect),
effect->GetFamily(),
effect->GetVendor(),
effect->GetName(),
effect->GetPath());
}
PluginID PluginManager::GetID(ImporterInterface *importer)
{
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
GetPluginTypeString(PluginTypeImporter).c_str(),
GetPluginTypeString(PluginTypeImporter),
wxEmptyString,
importer->GetVendor().c_str(),
importer->GetName().c_str(),
importer->GetPath().c_str());
importer->GetVendor(),
importer->GetName(),
importer->GetPath());
}
wxString PluginManager::GetPluginTypeString(PluginType type)
@ -2810,7 +2810,7 @@ bool PluginManager::SetConfig(const wxString & key, const wxString & value)
if (!key.IsEmpty())
{
wxString wxval = value.c_str();
wxString wxval = value;
result = GetSettings()->Write(key, wxval);
if (result)
{

View File

@ -180,7 +180,7 @@ void InitPreferences()
bool gone = wxRemoveFile(fullPath); // remove FirstTime.ini
if (!gone)
{
AudacityMessageBox(wxString::Format(_("Failed to remove %s"), fullPath.c_str()), _("Failed!"));
AudacityMessageBox(wxString::Format(_("Failed to remove %s"), fullPath), _("Failed!"));
}
}

View File

@ -503,7 +503,7 @@ bool ImportXMLTagHandler::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
strAttr = fileName.GetFullPath();
else
{
wxLogWarning(wxT("Could not import file: %s"), strAttr.c_str());
wxLogWarning(wxT("Could not import file: %s"), strAttr);
return false;
}
}
@ -1472,7 +1472,7 @@ 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.c_str() );
name.IsEmpty() ? "<untitled>" : (const char *)name );
}
// If we are not showing numbers, then <untitled> shows as 'Audacity'.
else if( name.IsEmpty() )
@ -2532,7 +2532,7 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
if (GetUndoManager()->UnsavedChanges()) {
TitleRestorer Restorer( this );// RAII
/* i18n-hint: The first %s numbers the project, the second %s is the project name.*/
wxString Title = wxString::Format(_("%sSave changes to %s?"), Restorer.sProjNumber.c_str(), Restorer.sProjName.c_str());
wxString Title = wxString::Format(_("%sSave changes to %s?"), Restorer.sProjNumber, Restorer.sProjName);
wxString Message = _("Save project before closing?");
if( !bHasTracks )
{
@ -2853,7 +2853,7 @@ bool AudacityProject::IsAlreadyOpen(const wxString & projPathName)
{
wxString errMsg =
wxString::Format(_("%s is already open in another window."),
newProjPathName.GetName().c_str());
newProjPathName.GetName());
wxLogError(errMsg);
AudacityMessageBox(errMsg, _("Error Opening Project"), wxOK | wxCENTRE);
return true;
@ -3105,7 +3105,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
{
wxLogWarning(
wxT("Track %s had error reading clip values from project file."),
t->GetName().c_str());
t->GetName());
err = true;
}
@ -3122,7 +3122,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
{
wxLogWarning(
wxT("Left track %s had linked right track %s with extra right track link.\n Removing extra link from right track."),
t->GetName().c_str(), l->GetName().c_str());
t->GetName(), l->GetName());
err = true;
l->SetLinked(false);
}
@ -3135,7 +3135,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
{
wxLogWarning(
wxT("Track %s and %s had left/right track links out of order. Setting tracks to not be linked."),
t->GetName().c_str(), l->GetName().c_str());
t->GetName(), l->GetName());
err = true;
t->SetLinked(false);
}
@ -3144,7 +3144,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
{
wxLogWarning(
wxT("Track %s had link to NULL track. Setting it to not be linked."),
t->GetName().c_str());
t->GetName());
err = true;
t->SetLinked(false);
}
@ -3286,7 +3286,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
mFileName = wxT("");
SetProjectTitle();
wxLogError(wxT("Could not parse file \"%s\". \nError: %s"), fileName.c_str(), xmlFile.GetErrorStr().c_str());
wxLogError(wxT("Could not parse file \"%s\". \nError: %s"), fileName, xmlFile.GetErrorStr());
AudacityMessageBox(xmlFile.GetErrorStr(),
_("Error Opening Project"),
wxOK | wxCENTRE, this);
@ -3461,7 +3461,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
projName = GetName() + wxT("_data");
if (!mDirManager->SetProject(projPath, projName, false)) {
AudacityMessageBox(wxString::Format(_("Couldn't find the project data folder: \"%s\""),
projName.c_str()),
projName),
_("Error Opening Project"),
wxOK | wxCENTRE, this);
return false;
@ -3517,7 +3517,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
wxString msg;
/* i18n-hint: %s will be replaced by the version number.*/
msg.Printf(_("This file was saved using Audacity %s.\nYou are using Audacity %s. You may need to upgrade to a newer version to open this file."),
audacityVersion.c_str(),
audacityVersion,
AUDACITY_VERSION_STRING);
AudacityMessageBox(msg,
_("Can't open project file"),
@ -3544,7 +3544,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
// Specifically detect older versions of Audacity
if ( bIsOld | bIsVeryOld ) {
wxString msg;
msg.Printf(gsLegacyFileWarning(), audacityVersion.c_str());
msg.Printf(gsLegacyFileWarning(), audacityVersion);
int icon_choice = wxICON_EXCLAMATION;
if( bIsVeryOld )
@ -3841,7 +3841,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
// saving compressed
if (!success) {
AudacityMessageBox(wxString::Format(_("Could not save project. Perhaps %s \nis not writable or the disk is full."),
project.c_str()),
project),
_("Error Saving Project"),
wxICON_ERROR, this);
@ -3867,7 +3867,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
if( !wxDir::Exists( projPath ) ){
AudacityMessageBox(wxString::Format(
_("Could not save project. Path not found. Try creating \ndirectory \"%s\" before saving project with this name."),
projPath.c_str()),
projPath),
_("Error Saving Project"),
wxICON_ERROR, this);
return (success = false);
@ -4017,7 +4017,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
safetyFileName = wxT("");
mStatusBar->SetStatusText(wxString::Format(_("Saved %s"),
mFileName.c_str()), mainStatusBarField);
mFileName), mainStatusBarField);
return true;
}
@ -4183,7 +4183,7 @@ void AudacityProject::AddImportedTracks(const wxString &fileName,
GetSelectionBar()->SetRate(mRate);
}
PushState(wxString::Format(_("Imported '%s'"), fileName.c_str()),
PushState(wxString::Format(_("Imported '%s'"), fileName),
_("Import"));
#if defined(__WXGTK__)
@ -4363,7 +4363,7 @@ To open a compressed project takes longer than usual, as it imports \n\
each compressed track.\n"),
true) != wxID_OK)
return false;
sDialogTitle.Printf(_("%sSave Compressed Project \"%s\" As..."), Restorer.sProjNumber.c_str(),Restorer.sProjName.c_str());
sDialogTitle.Printf(_("%sSave Compressed Project \"%s\" As..."), Restorer.sProjNumber,Restorer.sProjName);
}
else
{
@ -4373,7 +4373,7 @@ each compressed track.\n"),
For an audio file that will open in other apps, use 'Export'.\n"),
true) != wxID_OK)
return false;
sDialogTitle.Printf(_("%sSave Project \"%s\" As..."), Restorer.sProjNumber.c_str(), Restorer.sProjName.c_str());
sDialogTitle.Printf(_("%sSave Project \"%s\" As..."), Restorer.sProjNumber, Restorer.sProjName);
}
// JKC: I removed 'wxFD_OVERWRITE_PROMPT' because we are checking
@ -5524,7 +5524,7 @@ void AudacityProject::RemoveTrack(Track * toRemove)
PushState(
wxString::Format(_("Removed track '%s.'"),
name.c_str()),
name),
_("Track Remove"));
TP_RedrawScrollbars();

View File

@ -472,8 +472,8 @@ void Sequence::Paste(sampleCount s, const Sequence *src)
wxLogError(
wxT("Sequence::Paste: sampleCount s %s is < 0 or > mNumSamples %s)."),
// PRL: Why bother with Internat when the above is just wxT?
Internat::ToString(s.as_double(), 0).c_str(),
Internat::ToString(mNumSamples.as_double(), 0).c_str());
Internat::ToString(s.as_double(), 0),
Internat::ToString(mNumSamples.as_double(), 0));
THROW_INCONSISTENCY_EXCEPTION;
}
@ -483,8 +483,8 @@ void Sequence::Paste(sampleCount s, const Sequence *src)
wxLogError(
wxT("Sequence::Paste: mNumSamples %s + src->mNumSamples %s would overflow."),
// PRL: Why bother with Internat when the above is just wxT?
Internat::ToString(mNumSamples.as_double(), 0).c_str(),
Internat::ToString(src->mNumSamples.as_double(), 0).c_str());
Internat::ToString(mNumSamples.as_double(), 0),
Internat::ToString(src->mNumSamples.as_double(), 0));
THROW_INCONSISTENCY_EXCEPTION;
}
@ -845,7 +845,7 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
mErrorOpening = true;
wxLogWarning(
wxT(" Sequence has bad %s attribute value, %s, that should be a positive integer."),
attr, strValue.c_str());
attr, strValue);
return false;
}
@ -976,8 +976,8 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
wxLogWarning(
wxT(" Sequence has missing block file with length %s > mMaxSamples %s.\n Setting length to mMaxSamples. This will likely cause some block files to be considered orphans."),
// PRL: Why bother with Internat when the above is just wxT?
Internat::ToString(len.as_double(), 0).c_str(),
Internat::ToString((double)mMaxSamples, 0).c_str());
Internat::ToString(len.as_double(), 0),
Internat::ToString((double)mMaxSamples, 0));
len = mMaxSamples;
}
// len is at most mMaxSamples:
@ -1003,9 +1003,9 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
wxT(" Start (%s) for block file %s is not one sample past end of previous block (%s).\n")
wxT(" Moving start so blocks are contiguous."),
// PRL: Why bother with Internat when the above is just wxT?
Internat::ToString(block.start.as_double(), 0).c_str(),
sFileAndExtension.c_str(),
Internat::ToString(numSamples.as_double(), 0).c_str());
Internat::ToString(block.start.as_double(), 0),
sFileAndExtension,
Internat::ToString(numSamples.as_double(), 0));
block.start = numSamples;
mErrorOpening = true;
}
@ -1015,8 +1015,8 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
wxLogWarning(
wxT("Gap detected in project file. Correcting sequence sample count from %s to %s."),
// PRL: Why bother with Internat when the above is just wxT?
Internat::ToString(mNumSamples.as_double(), 0).c_str(),
Internat::ToString(numSamples.as_double(), 0).c_str());
Internat::ToString(mNumSamples.as_double(), 0),
Internat::ToString(numSamples.as_double(), 0));
mNumSamples = numSamples;
mErrorOpening = true;
}
@ -1061,7 +1061,7 @@ void Sequence::WriteXML(XMLWriter &xmlFile) const
wxString sMsg =
wxString::Format(
_("Sequence has block file exceeding maximum %s samples per block.\nTruncating to this maximum length."),
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0));
AudacityMessageBox(sMsg, _("Warning - Truncating Overlong Block File"), wxICON_EXCLAMATION | wxOK);
wxLogWarning(sMsg);
bb.f->SetLength(mMaxSamples);
@ -1908,7 +1908,7 @@ void Sequence::ConsistencyCheck
ex.GetLine(), whereStr);
wxString str;
DebugPrintf(mBlock, mNumSamples, &str);
wxLogError(wxT("%s"), str.c_str());
wxLogError(wxT("%s"), str);
wxLogError(wxT("*** Please report this error to https://forum.audacityteam.org/. ***\n\n")
wxT("Recommended course of action:\n")
wxT("Undo the failed operation(s), then export or save your work and quit."));

View File

@ -707,7 +707,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
// No href in html. Uses title not alt.
wxRect R( mFlow.Rect() );
wxLogDebug( wxT("<area title=\"Bitmap:%s\" shape=rect coords=\"%i,%i,%i,%i\">"),
mBitmapNames[i].c_str(),
mBitmapNames[i],
R.GetLeft(), R.GetTop(), R.GetRight(), R.GetBottom() );
#endif
}
@ -737,7 +737,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
// No href in html. Uses title not alt.
wxRect R( mFlow.Rect() );
wxLogDebug( wxT("<area title=\"Colour:%s\" shape=rect coords=\"%i,%i,%i,%i\">"),
mColourNames[i].c_str(),
mColourNames[i],
R.GetLeft(), R.GetTop(), R.GetRight(), R.GetBottom() );
#endif
}
@ -759,7 +759,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
AudacityMessageBox(
wxString::Format(
// _("Theme cache file:\n %s\nalready exists.\nAre you sure you want to replace it?"),
FileName.c_str() )
FileName )
);
return;
}
@ -777,7 +777,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
AudacityMessageBox(
wxString::Format(
_("Audacity could not write file:\n %s."),
FileName.c_str() ));
FileName ));
return;
}
AudacityMessageBox(
@ -787,7 +787,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
such as those on button controls. Audacity can load and save alternative
themes. */
_("Theme written to:\n %s."),
FileName.c_str() ));
FileName ));
}
// ELSE saving to a C code textual version.
else
@ -799,7 +799,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
AudacityMessageBox(
wxString::Format(
_("Audacity could not open file:\n %s\nfor writing."),
FileName.c_str() ));
FileName ));
return;
}
if( !ImageCache.SaveFile(OutStream, wxBITMAP_TYPE_PNG ) )
@ -807,14 +807,14 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
AudacityMessageBox(
wxString::Format(
_("Audacity could not write images to file:\n %s."),
FileName.c_str() ));
FileName ));
return;
}
AudacityMessageBox(
wxString::Format(
/* i18n-hint "Cee" means the C computer programming language */
_("Theme as Cee code written to:\n %s."),
FileName.c_str() ));
FileName ));
}
}
@ -850,7 +850,7 @@ void ThemeBase::WriteImageMap( )
wxRect R( mFlow.RectInner() );
File.Write( wxString::Format(
wxT("<area title=\"Bitmap:%s\" shape=rect coords=\"%i,%i,%i,%i\">\r\n"),
mBitmapNames[i].c_str(),
mBitmapNames[i],
R.GetLeft(), R.GetTop(), R.GetRight(), R.GetBottom()) );
}
}
@ -863,7 +863,7 @@ void ThemeBase::WriteImageMap( )
// No href in html. Uses title not alt.
wxRect R( mFlow.RectInner() );
File.Write( wxString::Format( wxT("<area title=\"Colour:%s\" shape=rect coords=\"%i,%i,%i,%i\">\r\n"),
mColourNames[i].c_str(),
mColourNames[i],
R.GetLeft(), R.GetTop(), R.GetRight(), R.GetBottom()) );
}
File.Write( wxT("</map>\r\n") );
@ -900,14 +900,14 @@ void ThemeBase::WriteImageDefs( )
Temp.Replace( wxT(" "), wxT(" | ") );
File.Write( wxString::Format( wxT("\r\n SET_THEME_FLAGS( %s );\r\n"),
Temp.c_str() ));
Temp ));
}
File.Write( wxString::Format(
wxT(" DEFINE_IMAGE( bmp%s, wxImage( %i, %i ), wxT(\"%s\"));\r\n"),
mBitmapNames[i].c_str(),
mBitmapNames[i],
SrcImage.GetWidth(),
SrcImage.GetHeight(),
mBitmapNames[i].c_str()
mBitmapNames[i]
));
}
}
@ -968,7 +968,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
AudacityMessageBox(
wxString::Format(
_("Audacity could not find file:\n %s.\nTheme not loaded."),
FileName.c_str() ));
FileName ));
return false;
}
if( !ImageCache.LoadFile( FileName, wxBITMAP_TYPE_PNG ))
@ -977,7 +977,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
AudacityMessageBox(
wxString::Format(
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
FileName.c_str() ));
FileName ));
return false;
}
}
@ -1095,7 +1095,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
AudacityMessageBox(
wxString::Format(
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
FileName.c_str() ));
FileName ));
return;
}
/// JKC: \bug (wxWidgets) A png may have been saved with alpha, but when you
@ -1104,7 +1104,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
/// and that transfers the mask into the alpha channel, and we're done.
if( ! mImages[i].HasAlpha() )
{
// wxLogDebug( wxT("File %s lacked alpha"), mBitmapNames[i].c_str() );
// wxLogDebug( wxT("File %s lacked alpha"), mBitmapNames[i] );
mImages[i].InitAlpha();
}
mBitmaps[i] = wxBitmap( mImages[i] );
@ -1117,7 +1117,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
if( bOkIfNotFound )
return;
AudacityMessageBox(wxString::Format(_("None of the expected theme component files\n were found in:\n %s."),
FileNames::ThemeComponentsDir().c_str()));
FileNames::ThemeComponentsDir()));
}
}
@ -1141,7 +1141,7 @@ void ThemeBase::SaveComponents()
AudacityMessageBox(
wxString::Format(
_("Could not create directory:\n %s"),
FileNames::ThemeComponentsDir().c_str() ));
FileNames::ThemeComponentsDir() ));
return;
}
}
@ -1169,7 +1169,7 @@ void ThemeBase::SaveComponents()
AudacityMessageBox(
wxString::Format(
_("Some required files in:\n %s\nwere already present. Overwrite?"),
FileNames::ThemeComponentsDir().c_str()),
FileNames::ThemeComponentsDir()),
AudacityMessageBoxCaptionStr(),
wxYES_NO | wxNO_DEFAULT);
if(result == wxNO)
@ -1186,7 +1186,7 @@ void ThemeBase::SaveComponents()
AudacityMessageBox(
wxString::Format(
_("Audacity could not save file:\n %s"),
FileName.c_str() ));
FileName ));
return;
}
}
@ -1194,7 +1194,7 @@ void ThemeBase::SaveComponents()
AudacityMessageBox(
wxString::Format(
_("Theme written to:\n %s."),
FileNames::ThemeComponentsDir().c_str() ));
FileNames::ThemeComponentsDir() ));
}

View File

@ -535,9 +535,9 @@ int TimerRecordDialog::RunWaitDialog()
// Second column
strMsg += wxString::Format(wxT("%s\n%s\n%s\n\n%s\n%s\n%s"),
GetDisplayDate(m_DateTime_Start).c_str(),
GetDisplayDate(m_DateTime_Start),
m_TimeSpan_Duration.Format(),
GetDisplayDate(m_DateTime_End).c_str(),
GetDisplayDate(m_DateTime_End),
(m_bAutoSaveEnabled ? _("Yes") : _("No")),
(m_bAutoExportEnabled ? _("Yes") : _("No")),
sPostAction);
@ -755,7 +755,7 @@ wxString TimerRecordDialog::GetDisplayDate( wxDateTime & dt )
#endif
// Use default formatting
wxPrintf(wxT("%s\n"), dt.Format().c_str());
wxPrintf(wxT("%s\n"), dt.Format());
return dt.FormatDate() + wxT(" ") + dt.FormatTime();
}
@ -1020,9 +1020,9 @@ ProgressResult TimerRecordDialog::WaitForStart()
// Second column
strMsg += wxString::Format(wxT("%s\n%s\n%s\n\n%s\n%s\n%s"),
GetDisplayDate(m_DateTime_Start).c_str(),
GetDisplayDate(m_DateTime_Start),
m_TimeSpan_Duration.Format(),
GetDisplayDate(m_DateTime_End).c_str(),
GetDisplayDate(m_DateTime_End),
(m_bAutoSaveEnabled ? _("Yes") : _("No")),
(m_bAutoExportEnabled ? _("Yes") : _("No")),
sPostAction);

View File

@ -83,7 +83,7 @@ void ComputeLegacySummaryInfo(const wxFileName &fileName,
// FIXME: TRAP_ERR no report to user of absent summary files.
if (!summaryFile.IsOpened()) {
wxLogWarning(wxT("Unable to access summary file %s; substituting silence for remainder of session"),
fullPath.c_str());
fullPath);
read = info->frames64K * info->bytesPerFrame;
memset(data.ptr(), 0, read);

View File

@ -996,7 +996,7 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & name,
// For key bindings for commands with a list, such as effects,
// the name in prefs is the category name plus the effect name.
if (multi) {
entry->name = wxString::Format(wxT("%s:%s"), name.c_str(), label.c_str());
entry->name = wxString::Format(wxT("%s:%s"), name, label);
}
// Key from preferences overridse the default key given
@ -1023,13 +1023,13 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & name,
if( prev->label != entry->label )
{
wxLogDebug(wxT("Command '%s' defined by '%s' and '%s'"),
entry->name.c_str(),
prev->label.BeforeFirst(wxT('\t')).c_str(),
entry->label.BeforeFirst(wxT('\t')).c_str());
entry->name,
prev->label.BeforeFirst(wxT('\t')),
entry->label.BeforeFirst(wxT('\t')));
wxFAIL_MSG(wxString::Format(wxT("Command '%s' defined by '%s' and '%s'"),
entry->name.c_str(),
prev->label.BeforeFirst(wxT('\t')).c_str(),
entry->label.BeforeFirst(wxT('\t')).c_str()));
entry->name,
prev->label.BeforeFirst(wxT('\t')),
entry->label.BeforeFirst(wxT('\t'))));
}
}
#endif
@ -1806,9 +1806,9 @@ void CommandManager::CheckDups()
if (mCommandList[i]->key == mCommandList[j]->key) {
wxString msg;
msg.Printf(wxT("key combo '%s' assigned to '%s' and '%s'"),
mCommandList[i]->key.c_str(),
mCommandList[i]->label.BeforeFirst(wxT('\t')).c_str(),
mCommandList[j]->label.BeforeFirst(wxT('\t')).c_str());
mCommandList[i]->key,
mCommandList[i]->label.BeforeFirst(wxT('\t')),
mCommandList[j]->label.BeforeFirst(wxT('\t')));
wxASSERT_MSG(mCommandList[i]->key != mCommandList[j]->key, msg);
}
}

View File

@ -40,7 +40,7 @@ bool HelpCommand::Apply(CommandExecutionContext WXUNUSED(context))
CommandType *type = CommandDirectory::Get()->LookUp(commandName);
if (type == NULL)
{
Error(wxString::Format(wxT("Command '%s' does not exist!"), commandName.c_str()));
Error(wxString::Format(wxT("Command '%s' does not exist!"), commandName));
return false;
}
Status(type->Describe());

View File

@ -104,17 +104,17 @@ bool ExportCommand::Apply(CommandExecutionContext context)
bool exportSuccess = exporter.Process(context.GetProject(),
std::max(0L, numChannels),
extension.c_str(), filename,
extension, filename,
selection, t0, t1);
if (exportSuccess)
{
Status(wxString::Format(wxT("Exported to %s format: %s"),
extension.c_str(), filename.c_str()));
extension, filename));
return true;
}
Error(wxString::Format(wxT("Could not export to %s format!"), extension.c_str()));
Error(wxString::Format(wxT("Could not export to %s format!"), extension));
return false;
}

View File

@ -598,7 +598,7 @@ wxString ScreenshotCommand::MakeFileName(const wxString &path, const wxString &b
int i = 0;
do {
filename.Printf(wxT("%s%s%03d.png"),
prefix.c_str(), basename.c_str(), i);
prefix, basename, i);
i++;
} while (::wxFileExists(filename));

View File

@ -250,7 +250,7 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S)
S.AddTitle(_("Change Pitch without Changing Tempo"));
S.AddTitle(
wxString::Format(_("Estimated Start Pitch: %s%d (%.3f Hz)"),
pitch[m_nFromPitch].c_str(), m_nFromOctave, m_FromFrequency));
pitch[m_nFromPitch], m_nFromOctave, m_FromFrequency));
}
S.EndVerticalLay();

View File

@ -521,7 +521,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
/* i18n-hint: WCAG abbreviates Web Content Accessibility Guidelines */
f.AddLine(_("WCAG 2.0 Success Criteria 1.4.7 Contrast Results"));
f.AddLine(wxT(""));
f.AddLine(wxString::Format(_("Filename = %s."), project->GetFileName().c_str() ));
f.AddLine(wxString::Format(_("Filename = %s."), project->GetFileName() ));
f.AddLine(wxT(""));
f.AddLine(_("Foreground"));
float t = (float)mForegroundStartT->GetValue();
@ -570,7 +570,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
int minute = now.GetMinute();
int second = now.GetSecond();
sNow = wxString::Format(wxT("%d %s %02d %02dh %02dm %02ds"),
dom, monthName.c_str(), year, hour, minute, second);
dom, monthName, year, hour, minute, second);
f.AddLine(sNow);
f.AddLine(wxT("==================================="));

View File

@ -1052,8 +1052,8 @@ bool Effect::SetAutomationParameters(const wxString & parms)
Effect::MessageBox(
wxString::Format(
_("%s: Could not load settings below. Default settings will be used.\n\n%s"),
GetTranslatedName().c_str(),
preset.c_str()
GetTranslatedName(),
preset
)
);
@ -1217,7 +1217,7 @@ bool Effect::DoEffect(wxWindow *parent,
auto name = GetTranslatedName();
ProgressDialog progress{
name,
wxString::Format(_("Applying %s..."), name.c_str()),
wxString::Format(_("Applying %s..."), name),
pdlgHideStopButton
};
auto vr = valueRestorer( mProgress, &progress );
@ -3344,11 +3344,11 @@ void EffectUIHost::OnMenu(wxCommandEvent & WXUNUSED(evt))
{
auto sub = std::make_unique<wxMenu>();
sub->Append(kDummyID, wxString::Format(_("Type: %s"), mEffect->GetFamily().c_str()));
sub->Append(kDummyID, wxString::Format(_("Name: %s"), mEffect->GetTranslatedName().c_str()));
sub->Append(kDummyID, wxString::Format(_("Version: %s"), mEffect->GetVersion().c_str()));
sub->Append(kDummyID, wxString::Format(_("Vendor: %s"), mEffect->GetVendor().c_str()));
sub->Append(kDummyID, wxString::Format(_("Description: %s"), mEffect->GetTranslatedDescription().c_str()));
sub->Append(kDummyID, wxString::Format(_("Type: %s"), mEffect->GetFamily()));
sub->Append(kDummyID, wxString::Format(_("Name: %s"), mEffect->GetTranslatedName()));
sub->Append(kDummyID, wxString::Format(_("Version: %s"), mEffect->GetVersion()));
sub->Append(kDummyID, wxString::Format(_("Vendor: %s"), mEffect->GetVendor()));
sub->Append(kDummyID, wxString::Format(_("Description: %s"), mEffect->GetTranslatedDescription()));
menu.Append(0, _("About"), sub.release());
}
@ -3553,7 +3553,7 @@ void EffectUIHost::OnDeletePreset(wxCommandEvent & evt)
{
wxString preset = mUserPresets[evt.GetId() - kDeletePresetID];
int res = AudacityMessageBox(wxString::Format(_("Are you sure you want to delete \"%s\"?"), preset.c_str()),
int res = AudacityMessageBox(wxString::Format(_("Are you sure you want to delete \"%s\"?"), preset),
_("Delete Preset"),
wxICON_QUESTION | wxYES_NO);
if (res == wxYES)

View File

@ -149,7 +149,7 @@ wxString EffectManager::GetEffectDescription(const PluginID & ID)
if (effect)
{
return wxString::Format(_("Applied effect: %s"), GetEffectName(ID).c_str());
return wxString::Format(_("Applied effect: %s"), GetEffectName(ID));
}
return wxEmptyString;
@ -718,7 +718,7 @@ Effect *EffectManager::GetEffect(const PluginID & ID)
}
AudacityMessageBox(wxString::Format(_("Attempting to initialize the following effect failed:\n\n%s\n\nMore information may be available in Help->Show Log"),
PluginManager::Get().GetName(ID).c_str()),
PluginManager::Get().GetName(ID)),
_("Effect failed to initialize"));
return NULL;

View File

@ -151,7 +151,7 @@ EffectRack::EffectRack()
wxString slot;
gPrefs->Read(wxString::Format(wxT("/EffectsRack/Slot%02d"), i), &slot);
Effect *effect = em.GetEffect(slot.AfterFirst(wxT(',')).c_str());
Effect *effect = em.GetEffect(slot.AfterFirst(wxT(',')));
if (effect)
{
Add(effect, slot.BeforeFirst(wxT(',')) == wxT("1"), true);
@ -173,7 +173,7 @@ EffectRack::~EffectRack()
gPrefs->Write(wxString::Format(wxT("/EffectsRack/Slot%02d"), i),
wxString::Format(wxT("%d,%s"),
mPowerState[i],
effect->GetID().c_str()));
effect->GetID()));
}
}
}

View File

@ -1390,7 +1390,7 @@ void EffectEqualization::LoadCurves(const wxString &fileName, bool append)
{
wxString msg;
/* i18n-hint: EQ stands for 'Equalization'.*/
msg.Printf(_("Error Loading EQ Curves from file:\n%s\nError message says:\n%s"), fullPath.c_str(), reader.GetErrorStr().c_str());
msg.Printf(_("Error Loading EQ Curves from file:\n%s\nError message says:\n%s"), fullPath, reader.GetErrorStr());
// Inform user of load failure
Effect::MessageBox( msg,
wxOK | wxCENTRE,
@ -1444,7 +1444,7 @@ void EffectEqualization::UpdateDefaultCurves(bool updateAll /* false */)
mCurves.Clear();
// We only wamt to look for the shipped EQDefaultCurves.xml
wxFileName fn = wxFileName(FileNames::ResourcesDir(), wxT("EQDefaultCurves.xml"));
wxLogDebug(wxT("Attempting to load EQDefaultCurves.xml from %s"),fn.GetFullPath().c_str());
wxLogDebug(wxT("Attempting to load EQDefaultCurves.xml from %s"),fn.GetFullPath());
XMLFileReader reader;
if(!reader.Parse(this, fn.GetFullPath())) {
@ -1559,7 +1559,7 @@ bool EffectEqualization::GetDefaultFileName(wxFileName &fileName)
{
// LLL: Is there really a need for an error message at all???
//wxString errorMessage;
//errorMessage.Printf(_("EQCurves.xml and EQDefaultCurves.xml were not found on your system.\nPlease press 'help' to visit the download page.\n\nSave the curves at %s"), FileNames::DataDir().c_str());
//errorMessage.Printf(_("EQCurves.xml and EQDefaultCurves.xml were not found on your system.\nPlease press 'help' to visit the download page.\n\nSave the curves at %s"), FileNames::DataDir());
//ShowErrorDialog(mUIParent, _("EQCurves.xml and EQDefaultCurves.xml missing"),
// errorMessage, wxT("http://wiki.audacityteam.org/wiki/EQCurvesDownload"), false);
@ -1957,7 +1957,7 @@ bool EffectEqualization::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
for(size_t i=0;i<mCurves.GetCount();i++)
{
if(n>0)
strValueTemp.Printf(wxT("%s (%d)"),strValue.c_str(),n);
strValueTemp.Printf(wxT("%s (%d)"),strValue,n);
if(mCurves[i].Name == strValueTemp)
{
exists = true;
@ -3536,7 +3536,7 @@ void EditCurvesDialog::OnExport( wxCommandEvent & WXUNUSED(event))
mEffect->SaveCurves(fileName);
mEffect->mCurves = temp;
wxString message;
message.Printf(_("%d curves exported to %s"), i, fileName.c_str());
message.Printf(_("%d curves exported to %s"), i, fileName);
mEffect->Effect::MessageBox(message,
Effect::DefaultMessageBoxStyle,
_("Curves exported"));

View File

@ -506,8 +506,8 @@ bool EffectEqualization48x::Benchmark(EffectEqualization* effectEqualization)
wxTimeSpan tsDefaultThreaded(0, 0, 0, times[3]);
wxTimeSpan tsDefault(0, 0, 0, times[4]);
Effect::MessageBox(wxString::Format(_("Benchmark times:\nOriginal: %s\nDefault Segmented: %s\nDefault Threaded: %s\nSSE: %s\nSSE Threaded: %s\n"),tsDefault.Format(wxT("%M:%S.%l")).c_str(),
tsDefaultEnhanced.Format(wxT("%M:%S.%l")).c_str(), tsDefaultThreaded.Format(wxT("%M:%S.%l")).c_str(),tsSSE.Format(wxT("%M:%S.%l")).c_str(),tsSSEThreaded.Format(wxT("%M:%S.%l")).c_str()));
Effect::MessageBox(wxString::Format(_("Benchmark times:\nOriginal: %s\nDefault Segmented: %s\nDefault Threaded: %s\nSSE: %s\nSSE Threaded: %s\n"),tsDefault.Format(wxT("%M:%S.%l")),
tsDefaultEnhanced.Format(wxT("%M:%S.%l")), tsDefaultThreaded.Format(wxT("%M:%S.%l")),tsSSE.Format(wxT("%M:%S.%l")),tsSSEThreaded.Format(wxT("%M:%S.%l"))));
return bBreakLoop; // return !bBreakLoop ?
}

View File

@ -506,7 +506,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
wxString effectID = effectTzr.GetNextToken();
wxString cmd;
cmd.Printf(wxT("\"%s\" %s \"%s;%s\""), cmdpath.c_str(), VSTCMDKEY, path.c_str(), effectID.c_str());
cmd.Printf(wxT("\"%s\" %s \"%s;%s\""), cmdpath, VSTCMDKEY, path, effectID);
VSTSubProcess proc;
try
@ -519,7 +519,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
}
catch (...)
{
wxLogMessage(_("VST plugin registration failed for %s\n"), path.c_str());
wxLogMessage(_("VST plugin registration failed for %s\n"), path);
error = true;
valid = false;
}
@ -557,7 +557,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
if (idCnt > 3)
{
progress.create( _("Scanning Shell VST"),
wxString::Format(_("Registering %d of %d: %-64.64s"), 0, idCnt, proc.GetName().c_str()),
wxString::Format(_("Registering %d of %d: %-64.64s"), 0, idCnt, proc.GetName()),
static_cast<int>(idCnt),
nullptr,
wxPD_APP_MODAL |
@ -631,7 +631,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
{
idNdx++;
cont = progress->Update(idNdx,
wxString::Format(_("Registering %d of %d: %-64.64s"), idNdx, idCnt, proc.GetName().c_str()));
wxString::Format(_("Registering %d of %d: %-64.64s"), idNdx, idCnt, proc.GetName()));
}
if (!skip && cont)
@ -709,16 +709,16 @@ void VSTEffectsModule::Check(const wxChar *path)
subids += wxString::Format(wxT("%d;"), effectIDs[i]);
}
out = wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeySubIDs, subids.RemoveLast().c_str());
out = wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeySubIDs, subids.RemoveLast());
}
else
{
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyBegin, wxEmptyString);
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyPath, effect.GetPath().c_str());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyName, effect.GetName().c_str());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVendor, effect.GetVendor().c_str());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVersion, effect.GetVersion().c_str());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyDescription, effect.GetDescription().c_str());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyPath, effect.GetPath());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyName, effect.GetName());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVendor, effect.GetVendor());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVersion, effect.GetVersion());
out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyDescription, effect.GetDescription());
out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyEffectType, effect.GetType());
out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyInteractive, effect.IsInteractive());
out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyAutomatable, effect.SupportsAutomation());
@ -1043,9 +1043,9 @@ intptr_t VSTEffect::AudioMaster(AEffect * effect,
#if defined(VST_DEBUG)
#if defined(__WXMSW__)
wxLogDebug(wxT("VST canDo: %s"), wxString::FromAscii((char *)ptr).c_str());
wxLogDebug(wxT("VST canDo: %s"), wxString::FromAscii((char *)ptr));
#else
wxPrintf(wxT("VST canDo: %s\n"), wxString::FromAscii((char *)ptr).c_str());
wxPrintf(wxT("VST canDo: %s\n"), wxString::FromAscii((char *)ptr));
#endif
#endif
@ -2960,14 +2960,14 @@ void VSTEffect::RefreshParameters(int skip)
{
text.Printf(wxT("%.5g"),callGetParameter(i));
}
mDisplays[i]->SetLabel(wxString::Format(wxT("%8s"), text.c_str()));
mDisplays[i]->SetLabel(wxString::Format(wxT("%8s"), text));
name += wxT(' ') + text;
text = GetString(effGetParamDisplay, i);
if (!text.IsEmpty())
{
text.Printf(wxT("%-8s"), GetString(effGetParamLabel, i).c_str());
mLabels[i]->SetLabel(wxString::Format(wxT("%8s"), text.c_str()));
text.Printf(wxT("%-8s"), GetString(effGetParamLabel, i));
mLabels[i]->SetLabel(wxString::Format(wxT("%8s"), text));
name += wxT(' ') + text;
}
@ -3438,7 +3438,7 @@ void VSTEffect::SaveFXB(const wxFileName & fn)
wxFFile f(fullPath, wxT("wb"));
if (!f.IsOpened())
{
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath),
_("Error Saving VST Presets"),
wxOK | wxCENTRE,
mParent);
@ -3505,7 +3505,7 @@ void VSTEffect::SaveFXB(const wxFileName & fn)
if (f.Error())
{
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath),
_("Error Saving VST Presets"),
wxOK | wxCENTRE,
mParent);
@ -3523,7 +3523,7 @@ void VSTEffect::SaveFXP(const wxFileName & fn)
wxFFile f(fullPath, wxT("wb"));
if (!f.IsOpened())
{
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath),
_("Error Saving VST Presets"),
wxOK | wxCENTRE,
mParent);
@ -3538,7 +3538,7 @@ void VSTEffect::SaveFXP(const wxFileName & fn)
f.Write(buf.GetData(), buf.GetDataLen());
if (f.Error())
{
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath),
_("Error Saving VST Presets"),
wxOK | wxCENTRE,
mParent);

View File

@ -270,10 +270,10 @@ void AudioUnitEffectsModule::LoadAudioUnitsOfType(OSType inAUType,
wxString name = wxCFStringRef::AsString(cfName);
effects.Add(wxString::Format(wxT("%-4.4s/%-4.4s/%-4.4s/%s"),
FromOSType(found.componentManufacturer).c_str(),
FromOSType(found.componentType).c_str(),
FromOSType(found.componentSubType).c_str(),
name.c_str()));
FromOSType(found.componentManufacturer),
FromOSType(found.componentType),
FromOSType(found.componentSubType),
name));
}
}
@ -306,7 +306,7 @@ wxString AudioUnitEffectsModule::FromOSType(OSType type)
(type & 0x0000ff00) << 8 |
(type & 0x000000ff) << 24;
return wxString::FromUTF8((char *)&rev, 4).c_str();
return wxString::FromUTF8((char *)&rev, 4);
}
OSType AudioUnitEffectsModule::ToOSType(const wxString & type)
@ -568,9 +568,9 @@ void AudioUnitEffectExportDialog::OnOk(wxCommandEvent & WXUNUSED(evt))
wxString path;
path.Printf(wxT("%s/%s/%s/%s.aupreset"),
PRESET_USER_PATH,
mEffect->mVendor.c_str(),
mEffect->mName.c_str(),
name.c_str());
mEffect->mVendor,
mEffect->mName,
name);
wxFileName fn(path);
fn.Normalize();
fn.Mkdir(0755, wxPATH_MKDIR_FULL);
@ -705,8 +705,8 @@ void AudioUnitEffectImportDialog::PopulateOrExchange(ShuttleGui & S)
wxString path;
path.Printf(wxT("%s/%s/%s"),
PRESET_LOCAL_PATH,
mEffect->mVendor.c_str(),
mEffect->mName.c_str());
mEffect->mVendor,
mEffect->mName);
wxFileName fn(path);
fn.Normalize();
@ -715,8 +715,8 @@ void AudioUnitEffectImportDialog::PopulateOrExchange(ShuttleGui & S)
path.Printf(wxT("%s/%s/%s"),
PRESET_USER_PATH,
mEffect->mVendor.c_str(),
mEffect->mName.c_str());
mEffect->mVendor,
mEffect->mName);
fn = path;
fn.Normalize();
@ -764,8 +764,8 @@ void AudioUnitEffectImportDialog::OnOk(wxCommandEvent & WXUNUSED(evt))
wxString path;
path.Printf(wxT("%s/%s.aupreset"),
item.GetText().c_str(),
mList->GetItemText(sel).c_str());
item.GetText(),
mList->GetItemText(sel));
// Create the CFURL for the path
CFunique_ptr<const __CFURL> url {

View File

@ -616,7 +616,7 @@ LadspaEffect::~LadspaEffect()
wxString LadspaEffect::GetPath()
{
return wxString::Format(wxT("%s;%d"), mPath.c_str(), mIndex);
return wxString::Format(wxT("%s;%d"), mPath, mIndex);
}
wxString LadspaEffect::GetSymbol()

View File

@ -545,10 +545,10 @@ bool NyquistEffect::Process()
mProps += wxString::Format(wxT("(setf *DECIMAL-SEPARATOR* #\\%c)\n"), wxNumberFormatter::GetDecimalSeparator());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'BASE)\n"), EscapeString(FileNames::BaseDir()).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'DATA)\n"), EscapeString(FileNames::DataDir()).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'HELP)\n"), EscapeString(FileNames::HtmlHelpDir().RemoveLast()).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'TEMP)\n"), EscapeString(FileNames::TempDir()).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'BASE)\n"), EscapeString(FileNames::BaseDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'DATA)\n"), EscapeString(FileNames::DataDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'HELP)\n"), EscapeString(FileNames::HtmlHelpDir().RemoveLast()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'TEMP)\n"), EscapeString(FileNames::TempDir()));
wxArrayString paths = NyquistEffect::GetNyquistSearchPath();
wxString list;
@ -558,8 +558,8 @@ bool NyquistEffect::Process()
}
list = list.RemoveLast();
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUGIN)\n"), list.c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUG-IN)\n"), list.c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUGIN)\n"), list);
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUG-IN)\n"), list);
// Date and time:
@ -575,18 +575,18 @@ bool NyquistEffect::Process()
mProps += wxString::Format(wxT("(setf *SYSTEM-TIME* (list %d %d %d %d %d))\n"),
year, doy, now.GetHour(), now.GetMinute(), now.GetSecond());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'DATE)\n"), now.FormatDate().c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'TIME)\n"), now.FormatTime().c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'ISO-DATE)\n"), now.FormatISODate().c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'ISO-TIME)\n"), now.FormatISOTime().c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'DATE)\n"), now.FormatDate());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'TIME)\n"), now.FormatTime());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'ISO-DATE)\n"), now.FormatISODate());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'ISO-TIME)\n"), now.FormatISOTime());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* %d 'YEAR)\n"), year);
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* %d 'DAY)\n"), dom); // day of month
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* %d 'MONTH)\n"), month);
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'MONTH-NAME)\n"), now.GetMonthName(month).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'DAY-NAME)\n"), now.GetWeekDayName(day).c_str());
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'MONTH-NAME)\n"), now.GetMonthName(month));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-TIME* \"%s\" 'DAY-NAME)\n"), now.GetWeekDayName(day));
mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'PROJECTS)\n"), (int) gAudacityProjects.size());
mProps += wxString::Format(wxT("(putprop '*PROJECT* \"%s\" 'NAME)\n"), project->GetName().c_str());
mProps += wxString::Format(wxT("(putprop '*PROJECT* \"%s\" 'NAME)\n"), project->GetName());
TrackListIterator all(project->GetTracks());
Track *t;
@ -627,7 +627,7 @@ bool NyquistEffect::Process()
// numbers to Nyquist, whereas using "%g" will use the user's
// decimal separator which may be a comma in some countries.
mProps += wxString::Format(wxT("(putprop '*PROJECT* (float %s) 'RATE)\n"),
Internat::ToString(project->GetRate()).c_str());
Internat::ToString(project->GetRate()));
mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'TRACKS)\n"), numTracks);
mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'WAVETRACKS)\n"), numWave);
mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'LABELTRACKS)\n"), numLabel);
@ -637,17 +637,17 @@ bool NyquistEffect::Process()
double previewLen = 6.0;
gPrefs->Read(wxT("/AudioIO/EffectsPreviewLen"), &previewLen);
mProps += wxString::Format(wxT("(putprop '*PROJECT* (float %s) 'PREVIEW-DURATION)\n"),
Internat::ToString(previewLen).c_str());
Internat::ToString(previewLen));
// *PREVIEWP* is true when previewing (better than relying on track view).
wxString isPreviewing = (this->IsPreviewing())? wxT("T") : wxT("NIL");
mProps += wxString::Format(wxT("(setf *PREVIEWP* %s)\n"), isPreviewing.c_str());
mProps += wxString::Format(wxT("(setf *PREVIEWP* %s)\n"), isPreviewing);
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %s) 'START)\n"),
Internat::ToString(mT0).c_str());
Internat::ToString(mT0));
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %s) 'END)\n"),
Internat::ToString(mT1).c_str());
mProps += wxString::Format(wxT("(putprop '*SELECTION* (list %s) 'TRACKS)\n"), waveTrackList.c_str());
Internat::ToString(mT1));
mProps += wxString::Format(wxT("(putprop '*SELECTION* (list %s) 'TRACKS)\n"), waveTrackList);
mProps += wxString::Format(wxT("(putprop '*SELECTION* %d 'CHANNELS)\n"), mNumSelectedChannels);
}
@ -733,15 +733,15 @@ _("Selection too long for Nyquist code.\nMaximum allowed selection is %ld sample
#if defined(EXPERIMENTAL_SPECTRAL_EDITING)
if (mF0 >= 0.0) {
lowHz.Printf(wxT("(float %s)"), Internat::ToString(mF0).c_str());
lowHz.Printf(wxT("(float %s)"), Internat::ToString(mF0));
}
if (mF1 >= 0.0) {
highHz.Printf(wxT("(float %s)"), Internat::ToString(mF1).c_str());
highHz.Printf(wxT("(float %s)"), Internat::ToString(mF1));
}
if ((mF0 >= 0.0) && (mF1 >= 0.0)) {
centerHz.Printf(wxT("(float %s)"), Internat::ToString(sqrt(mF0 * mF1)).c_str());
centerHz.Printf(wxT("(float %s)"), Internat::ToString(sqrt(mF0 * mF1)));
}
if ((mF0 > 0.0) && (mF1 >= mF0)) {
@ -749,15 +749,15 @@ _("Selection too long for Nyquist code.\nMaximum allowed selection is %ld sample
// (Observed on Linux)
double bw = log(mF1 / mF0) / log(2.0);
if (!std::isinf(bw)) {
bandwidth.Printf(wxT("(float %s)"), Internat::ToString(bw).c_str());
bandwidth.Printf(wxT("(float %s)"), Internat::ToString(bw));
}
}
#endif
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'LOW-HZ)\n"), lowHz.c_str());
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'CENTER-HZ)\n"), centerHz.c_str());
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'HIGH-HZ)\n"), highHz.c_str());
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'BANDWIDTH)\n"), bandwidth.c_str());
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'LOW-HZ)\n"), lowHz);
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'CENTER-HZ)\n"), centerHz);
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'HIGH-HZ)\n"), highHz);
mPerTrackProps += wxString::Format(wxT("(putprop '*SELECTION* %s 'BANDWIDTH)\n"), bandwidth);
}
success = ProcessOne();
@ -788,7 +788,7 @@ _("Selection too long for Nyquist code.\nMaximum allowed selection is %ld sample
NyquistOutputDialog dlog(mUIParent, -1,
mName,
_("Debug Output: "),
mDebugOutput.c_str());
mDebugOutput);
dlog.CentreOnParent();
dlog.ShowModal();
}
@ -948,14 +948,14 @@ bool NyquistEffect::ProcessOne()
}
cmd += wxString::Format(wxT("(putprop '*TRACK* %d 'INDEX)\n"), ++mTrackIndex);
cmd += wxString::Format(wxT("(putprop '*TRACK* \"%s\" 'NAME)\n"), mCurTrack[0]->GetName().c_str());
cmd += wxString::Format(wxT("(putprop '*TRACK* \"%s\" 'TYPE)\n"), type.c_str());
cmd += wxString::Format(wxT("(putprop '*TRACK* \"%s\" 'NAME)\n"), mCurTrack[0]->GetName());
cmd += wxString::Format(wxT("(putprop '*TRACK* \"%s\" 'TYPE)\n"), type);
// Note: "View" property may change when Audacity's choice of track views has stabilized.
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'VIEW)\n"), view.c_str());
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'VIEW)\n"), view);
cmd += wxString::Format(wxT("(putprop '*TRACK* %d 'CHANNELS)\n"), mCurNumChannels);
//NOTE: Audacity 2.1.3 True if spectral selection is enabled regardless of track view.
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'SPECTRAL-EDIT-ENABLED)\n"), spectralEditp.c_str());
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'SPECTRAL-EDIT-ENABLED)\n"), spectralEditp);
double startTime = 0.0;
double endTime = 0.0;
@ -975,15 +975,15 @@ bool NyquistEffect::ProcessOne()
}
cmd += wxString::Format(wxT("(putprop '*TRACK* (float %s) 'START-TIME)\n"),
Internat::ToString(startTime).c_str());
Internat::ToString(startTime));
cmd += wxString::Format(wxT("(putprop '*TRACK* (float %s) 'END-TIME)\n"),
Internat::ToString(endTime).c_str());
Internat::ToString(endTime));
cmd += wxString::Format(wxT("(putprop '*TRACK* (float %s) 'GAIN)\n"),
Internat::ToString(mCurTrack[0]->GetGain()).c_str());
Internat::ToString(mCurTrack[0]->GetGain()));
cmd += wxString::Format(wxT("(putprop '*TRACK* (float %s) 'PAN)\n"),
Internat::ToString(mCurTrack[0]->GetPan()).c_str());
Internat::ToString(mCurTrack[0]->GetPan()));
cmd += wxString::Format(wxT("(putprop '*TRACK* (float %s) 'RATE)\n"),
Internat::ToString(mCurTrack[0]->GetRate()).c_str());
Internat::ToString(mCurTrack[0]->GetRate()));
switch (mCurTrack[0]->GetSampleFormat())
{
@ -997,7 +997,7 @@ bool NyquistEffect::ProcessOne()
bitFormat = wxT("32.0");
break;
}
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'FORMAT)\n"), bitFormat.c_str());
cmd += wxString::Format(wxT("(putprop '*TRACK* %s 'FORMAT)\n"), bitFormat);
float maxPeakLevel = 0.0; // Deprecated as of 2.1.3
wxString clips, peakString, rmsString;
@ -1012,8 +1012,8 @@ bool NyquistEffect::ProcessOne()
// Each clip is a list (start-time, end-time)
for (const auto clip: ca) {
clips += wxString::Format(wxT("(list (float %s) (float %s))"),
Internat::ToString(clip->GetStartTime()).c_str(),
Internat::ToString(clip->GetEndTime()).c_str());
Internat::ToString(clip->GetStartTime()),
Internat::ToString(clip->GetEndTime()));
}
if (mCurNumChannels > 1) clips += wxT(" )");
@ -1025,14 +1025,14 @@ bool NyquistEffect::ProcessOne()
// On Debian, NaN samples give maxPeak = 3.40282e+38 (FLT_MAX)
if (!std::isinf(maxPeak) && !std::isnan(maxPeak) && (maxPeak < FLT_MAX)) {
peakString += wxString::Format(wxT("(float %s) "), Internat::ToString(maxPeak).c_str());
peakString += wxString::Format(wxT("(float %s) "), Internat::ToString(maxPeak));
} else {
peakString += wxT("nil ");
}
float rms = mCurTrack[i]->GetRMS(mT0, mT1); // may throw
if (!std::isinf(rms) && !std::isnan(rms)) {
rmsString += wxString::Format(wxT("(float %s) "), Internat::ToString(rms).c_str());
rmsString += wxString::Format(wxT("(float %s) "), Internat::ToString(rms));
} else {
rmsString += wxT("nil ");
}
@ -1040,7 +1040,7 @@ bool NyquistEffect::ProcessOne()
// A list of clips for mono, or an array of lists for multi-channel.
cmd += wxString::Format(wxT("(putprop '*TRACK* %s%s ) 'CLIPS)\n"),
(mCurNumChannels == 1) ? wxT("(list ") : wxT("(vector "),
clips.c_str());
clips);
(mCurNumChannels > 1)?
cmd += wxString::Format(wxT("(putprop '*SELECTION* (vector %s) 'PEAK)\n"), peakString) :
@ -1048,7 +1048,7 @@ bool NyquistEffect::ProcessOne()
if (!std::isinf(maxPeakLevel) && !std::isnan(maxPeakLevel) && (maxPeakLevel < FLT_MAX)) {
cmd += wxString::Format(wxT("(putprop '*SELECTION* (float %s) 'PEAK-LEVEL)\n"),
Internat::ToString(maxPeakLevel).c_str());
Internat::ToString(maxPeakLevel));
}
(mCurNumChannels > 1)?
@ -1103,20 +1103,20 @@ bool NyquistEffect::ProcessOne()
// numbers to Nyquist, whereas using "%f" will use the user's
// decimal separator which may be a comma in some countries.
cmd += wxString::Format(wxT("(setf %s %s)\n"),
mControls[j].var.c_str(),
Internat::ToString(mControls[j].val, 14).c_str());
mControls[j].var,
Internat::ToString(mControls[j].val, 14));
}
else if (mControls[j].type == NYQ_CTRL_INT ||
mControls[j].type == NYQ_CTRL_INT_TEXT ||
mControls[j].type == NYQ_CTRL_CHOICE) {
cmd += wxString::Format(wxT("(setf %s %d)\n"),
mControls[j].var.c_str(),
mControls[j].var,
(int)(mControls[j].val));
}
else if (mControls[j].type == NYQ_CTRL_STRING) {
cmd += wxT("(setf ");
// restrict variable names to 7-bit ASCII:
cmd += mControls[j].var.c_str();
cmd += mControls[j].var;
cmd += wxT(" \"");
cmd += EscapeString(mControls[j].valStr); // unrestricted value will become quoted UTF-8
cmd += wxT("\")\n");
@ -1726,7 +1726,7 @@ void NyquistEffect::Parse(const wxString &line)
{
wxString str;
str.Printf(_("Bad Nyquist 'control' type specification: '%s' in plug-in file '%s'.\nControl not created."),
tokens[3].c_str(), mFileName.GetFullPath().c_str());
tokens[3], mFileName.GetFullPath());
// Too disturbing to show alert before Audacity frame is up.
// Effect::MessageBox(str, wxT("Nyquist Warning"), wxOK | wxICON_EXCLAMATION);

View File

@ -185,7 +185,7 @@ wxArrayString VampEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUS
if (outputName != name)
{
name = wxString::Format(wxT("%s: %s"),
name.c_str(), outputName.c_str());
name, outputName);
}
}
@ -318,7 +318,7 @@ std::unique_ptr<Vamp::Plugin> VampEffectsModule::FindPlugin(const wxString & pat
if (outputName != name)
{
name = wxString::Format(wxT("%s: %s"),
name.c_str(), outputName.c_str());
name, outputName);
}
}

View File

@ -445,7 +445,7 @@ bool VampEffect::Process()
addedTracks.push_back(AddAnalysisTrack(
multiple
? wxString::Format(wxT("%s: %s"),
left->GetName().c_str(), GetName().c_str())
left->GetName(), GetName())
: GetName()
));
LabelTrack *ltrack = addedTracks.back()->get();

View File

@ -616,9 +616,9 @@ bool Exporter::GetFilename()
else if (!ext.IsEmpty() && !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).c_str(),
mFilename.GetFullName().c_str(),
defext.c_str());
mPlugins[mFormat]->GetFormat(mSubFormat),
mFilename.GetFullName(),
defext);
int action = AudacityMessageBox(prompt,
_("Warning"),
@ -661,7 +661,7 @@ bool Exporter::GetFilename()
wxString prompt;
prompt.Printf(_("A file named \"%s\" already exists. Replace?"),
mFilename.GetFullPath().c_str());
mFilename.GetFullPath());
int action = AudacityMessageBox(prompt,
_("Warning"),

View File

@ -351,7 +351,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
}
}
wxSetEnv(wxT("PATH"),npath.c_str());
wxSetEnv(wxT("PATH"),npath);
#endif
// Kick off the command
@ -361,7 +361,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
#if defined(__WXMSW__)
auto cleanup = finally( [&] {
if (!opath.IsEmpty()) {
wxSetEnv(wxT("PATH"),opath.c_str());
wxSetEnv(wxT("PATH"),opath);
}
} );
#endif
@ -371,7 +371,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
if (!rc) {
AudacityMessageBox(wxString::Format(_("Cannot export audio to %s"),
fName.c_str()));
fName));
process.Detach();
process.CloseOutput();

View File

@ -279,7 +279,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
// and the default video/audio codecs that the format uses.
if ((mEncFormatDesc = av_guess_format(shortname, OSINPUT(mName), NULL)) == NULL)
{
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't determine format description for file \"%s\"."), mName.c_str()),
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't determine format description for file \"%s\"."), mName),
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
return false;
}
@ -301,7 +301,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
// At the moment Audacity can export only one audio stream
if ((mEncAudioStream = avformat_new_stream(mEncFormatCtx.get(), NULL)) == NULL)
{
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't add audio stream to output file \"%s\"."), mName.c_str()),
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't add audio stream to output file \"%s\"."), mName),
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
return false;
}
@ -326,7 +326,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
{
if ((err = ufile_fopen(&mEncFormatCtx->pb, mName, AVIO_FLAG_WRITE)) < 0)
{
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName.c_str(), err),
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName, err),
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
return false;
}
@ -352,7 +352,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
// Write headers to the output file.
if ((err = avformat_write_header(mEncFormatCtx.get(), NULL)) < 0)
{
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't write headers to output file \"%s\". Error code is %d."), mName.c_str(),err),
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't write headers to output file \"%s\". Error code is %d."), mName,err),
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
return false;
}

View File

@ -567,7 +567,7 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
FFmpegPreset *preset = FindPreset(name);
if (preset)
{
wxString query = wxString::Format(_("Overwrite preset '%s'?"),name.c_str());
wxString query = wxString::Format(_("Overwrite preset '%s'?"),name);
int action = AudacityMessageBox(query,_("Confirm Overwrite"),wxYES_NO | wxCENTRE);
if (action == wxNO) return;
}
@ -661,7 +661,7 @@ void FFmpegPresets::LoadPreset(ExportFFmpegOptions *parent, wxString &name)
FFmpegPreset *preset = FindPreset(name);
if (!preset)
{
AudacityMessageBox(wxString::Format(_("Preset '%s' does not exist."),name.c_str()));
AudacityMessageBox(wxString::Format(_("Preset '%s' does not exist."),name));
return;
}
@ -762,7 +762,7 @@ bool FFmpegPresets::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
mPreset = FindPreset(value);
if (mPreset)
{
wxString query = wxString::Format(_("Replace preset '%s'?"), value.c_str());
wxString query = wxString::Format(_("Replace preset '%s'?"), value);
int action = AudacityMessageBox(query, _("Confirm Overwrite"), wxYES_NO | wxCANCEL | wxCENTRE);
if (action == wxCANCEL)
{
@ -1407,7 +1407,7 @@ void ExportFFmpegOptions::FetchFormatList()
if (ofmt->audio_codec != AV_CODEC_ID_NONE)
{
mFormatNames.Add(wxString::FromUTF8(ofmt->name));
mFormatLongNames.Add(wxString::Format(wxT("%s - %s"),mFormatNames.Last().c_str(),wxString::FromUTF8(ofmt->long_name).c_str()));
mFormatLongNames.Add(wxString::Format(wxT("%s - %s"),mFormatNames.Last(),wxString::FromUTF8(ofmt->long_name)));
}
}
// Show all formats
@ -1427,7 +1427,7 @@ void ExportFFmpegOptions::FetchCodecList()
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().c_str(),wxString::FromUTF8(codec->long_name).c_str()));
mCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
}
}
// Show all codecs
@ -1610,7 +1610,7 @@ void ExportFFmpegOptions::FindSelectedFormat(wxString **name, wxString **longnam
wxString selfmt = mFormatList->GetString(selections[0]);
// Find it's index
int nFormat = mFormatNames.Index(selfmt.c_str());
int nFormat = mFormatNames.Index(selfmt);
if (nFormat == wxNOT_FOUND) return;
// Return short name and description
@ -1631,7 +1631,7 @@ void ExportFFmpegOptions::FindSelectedCodec(wxString **name, wxString **longname
wxString selcdc = mCodecList->GetString(selections[0]);
// Find it's index
int nCodec = mCodecNames.Index(selcdc.c_str());
int nCodec = mCodecNames.Index(selcdc);
if (nCodec == wxNOT_FOUND) return;
// Return short name and description
@ -1673,7 +1673,7 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
// 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().c_str(),wxString::FromUTF8(codec->long_name).c_str()));
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
}
}
}
@ -1689,7 +1689,7 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
{
if ((id >= 0) && codec->id == id) index = mShownCodecNames.GetCount();
mShownCodecNames.Add(wxString::FromUTF8(codec->name));
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last().c_str(),wxString::FromUTF8(codec->long_name).c_str()));
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
}
}
}
@ -1707,7 +1707,7 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i
{
if ((id >= 0) && codec->id == id) index = mShownCodecNames.GetCount();
mShownCodecNames.Add(wxString::FromUTF8(codec->name));
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last().c_str(),wxString::FromUTF8(codec->long_name).c_str()));
mShownCodecLongNames.Add(wxString::Format(wxT("%s - %s"),mShownCodecNames.Last(),wxString::FromUTF8(codec->long_name)));
}
}
}
@ -1737,7 +1737,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm
FromList.Add(CompatibilityList[i].fmt);
mShownFormatNames.Add(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).c_str()));
if (tofmt != NULL) mShownFormatLongNames.Add(wxString::Format(wxT("%s - %s"),CompatibilityList[i].fmt,wxString::FromUTF8(tofmt->long_name)));
}
}
bool found = false;
@ -1774,7 +1774,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm
{
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().c_str(),wxString::FromUTF8(ofmt->long_name).c_str()));
mShownFormatLongNames.Add(wxString::Format(wxT("%s - %s"),mShownFormatNames.Last(),wxString::FromUTF8(ofmt->long_name)));
}
}
}
@ -1795,7 +1795,7 @@ void ExportFFmpegOptions::OnDeletePreset(wxCommandEvent& WXUNUSED(event))
return;
}
wxString query = wxString::Format(_("Delete preset '%s'?"),presetname.c_str());
wxString query = wxString::Format(_("Delete preset '%s'?"),presetname);
int action = AudacityMessageBox(query,_("Confirm Deletion"),wxYES_NO | wxCENTRE);
if (action == wxNO) return;
@ -1818,7 +1818,7 @@ void ExportFFmpegOptions::OnSavePreset(wxCommandEvent& WXUNUSED(event))
return;
}
mPresets->SavePreset(this,name);
int index = mPresetNames.Index(name.c_str(),false);
int index = mPresetNames.Index(name,false);
if (index == -1)
{
mPresetNames.Add(name);
@ -1950,7 +1950,7 @@ void ExportFFmpegOptions::DoOnFormatList()
mFormatName->SetLabel(wxString(_("Failed to guess format")));
return;
}
mFormatName->SetLabel(wxString::Format(wxT("%s"),selfmtlong->c_str()));
mFormatName->SetLabel(wxString::Format(wxT("%s"), *selfmtlong));
int selcdcid = -1;
if (selcdc != NULL)
@ -1961,7 +1961,7 @@ void ExportFFmpegOptions::DoOnFormatList()
selcdcid = cdc->id;
}
}
int newselcdc = FetchCompatibleCodecList(selfmt->c_str(), (AVCodecID)selcdcid);
int newselcdc = FetchCompatibleCodecList(*selfmt, (AVCodecID)selcdcid);
if (newselcdc >= 0) mCodecList->Select(newselcdc);
AVCodec *cdc = NULL;
@ -1994,7 +1994,7 @@ void ExportFFmpegOptions::DoOnCodecList()
mCodecName->SetLabel(wxString(_("Failed to find the codec")));
return;
}
mCodecName->SetLabel(wxString::Format(wxT("[%d] %s"), (int) cdc->id,selcdclong->c_str()));
mCodecName->SetLabel(wxString::Format(wxT("[%d] %s"), (int) cdc->id, *selcdclong));
if (selfmt != NULL)
{

View File

@ -301,7 +301,7 @@ ProgressResult ExportFLAC::Export(AudacityProject *project,
#else
wxFFile f; // will be closed when it goes out of scope
if (!f.Open(fName, wxT("w+b"))) {
AudacityMessageBox(wxString::Format(_("FLAC export couldn't open %s"), fName.c_str()));
AudacityMessageBox(wxString::Format(_("FLAC export couldn't open %s"), fName));
return ProgressResult::Cancelled;
}

View File

@ -611,13 +611,13 @@ public:
S.SetBorder(10);
S.StartVerticalLay(true);
{
text.Printf(_("Audacity needs the file %s to create MP3s."), mName.c_str());
text.Printf(_("Audacity needs the file %s to create MP3s."), mName);
S.AddTitle(text);
S.SetBorder(3);
S.StartHorizontalLay(wxALIGN_LEFT, true);
{
text.Printf(_("Location of %s:"), mName.c_str());
text.Printf(_("Location of %s:"), mName);
S.AddTitle(text);
}
S.EndHorizontalLay();
@ -627,7 +627,7 @@ public:
{
if (mLibPath.GetFullPath().IsEmpty()) {
/* i18n-hint: There is a button to the right of the arrow.*/
text.Printf(_("To find %s, click here -->"), mName.c_str());
text.Printf(_("To find %s, click here -->"), mName);
mPathText = S.AddTextBox(wxT(""), text, 0);
}
else {
@ -659,7 +659,7 @@ public:
/* i18n-hint: It's asking for the location of a file, for
* example, "Where is lame_enc.dll?" - you could translate
* "Where would I find the file %s" instead if you want. */
question.Printf(_("Where is %s?"), mName.c_str());
question.Printf(_("Where is %s?"), mName);
wxString path = FileNames::SelectFile(FileNames::Operation::_None,
question,
@ -1070,7 +1070,7 @@ void MP3Exporter::SetChannel(int mode)
bool MP3Exporter::InitLibrary(wxString libpath)
{
wxLogMessage(wxT("Loading LAME from %s"), libpath.c_str());
wxLogMessage(wxT("Loading LAME from %s"), libpath);
#ifndef DISABLE_DYNAMIC_LOADING_LAME
if (!lame_lib.Load(libpath, wxDL_LAZY)) {
@ -1079,7 +1079,7 @@ bool MP3Exporter::InitLibrary(wxString libpath)
}
wxLogMessage(wxT("Actual LAME path %s"),
FileNames::PathFromAddr(lame_lib.GetSymbol(wxT("lame_init"))).c_str());
FileNames::PathFromAddr(lame_lib.GetSymbol(wxT("lame_init"))));
lame_init = (lame_init_t *)
lame_lib.GetSymbol(wxT("lame_init"));
@ -1829,13 +1829,13 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
title.Printf(selectionOnly ?
_("Exporting selected audio with %s preset") :
_("Exporting the audio with %s preset"),
FindName(setRates, WXSIZEOF(setRates), brate).c_str());
FindName(setRates, WXSIZEOF(setRates), brate));
}
else if (rmode == MODE_VBR) {
title.Printf(selectionOnly ?
_("Exporting selected audio with VBR quality %s") :
_("Exporting the audio with VBR quality %s"),
FindName(varRates, WXSIZEOF(varRates), brate).c_str());
FindName(varRates, WXSIZEOF(varRates), brate));
}
else {
title.Printf(selectionOnly ?

View File

@ -473,7 +473,7 @@ void ExportMultiple::OnCreate(wxCommandEvent& WXUNUSED(event))
}
::AudacityMessageBox(wxString::Format(_("\"%s\" successfully created."),
fn.GetPath().c_str()),
fn.GetPath()),
_("Export Multiple"),
wxOK | wxCENTRE, this);
}
@ -624,7 +624,7 @@ bool ExportMultiple::DirOk()
wxString prompt;
prompt.Printf(_("\"%s\" doesn't exist.\n\nWould you like to create it?"),
fn.GetFullPath().c_str());
fn.GetFullPath());
int action = AudacityMessageBox(prompt,
wxT("Warning"),
@ -662,7 +662,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
setting.destfile.SetPath(mDir->GetValue());
setting.destfile.SetExt(mPlugins[mPluginIndex]->GetExtension(mSubFormatIndex));
wxLogDebug(wxT("Plug-in index = %d, Sub-format = %d"), mPluginIndex, mSubFormatIndex);
wxLogDebug(wxT("File extension is %s"), setting.destfile.GetExt().c_str());
wxLogDebug(wxT("File extension is %s"), setting.destfile.GetExt());
wxString name; // used to hold file name whilst we mess with it
wxString title; // un-messed-with title of file for tagging with
@ -701,7 +701,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
// Numbering files...
if( !byName ) {
name.Printf(wxT("%s-%02d"), prefix.c_str(), l+1);
name.Printf(wxT("%s-%02d"), prefix, l+1);
} else if( addNumber ) {
// Following discussion with GA, always have 2 digits
// for easy file-name sorting (on Windows)
@ -845,7 +845,7 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
}
}
else {
name = (wxString::Format(wxT("%s-%02d"), prefix.c_str(), l+1));
name = (wxString::Format(wxT("%s-%02d"), prefix, l+1));
}
// store sanitised and user checked name in object
@ -938,7 +938,7 @@ ProgressResult ExportMultiple::DoExport(unsigned channels,
{
wxFileName name;
wxLogDebug(wxT("Doing multiple Export: File name \"%s\""), (inName.GetFullName()).c_str());
wxLogDebug(wxT("Doing multiple Export: File name \"%s\""), (inName.GetFullName()));
wxLogDebug(wxT("Channels: %i, Start: %lf, End: %lf "), channels, t0, t1);
if (selectedOnly)
wxLogDebug(wxT("Selected Region Only"));
@ -957,7 +957,7 @@ ProgressResult ExportMultiple::DoExport(unsigned channels,
int i = 2;
wxString base(name.GetName());
while (name.FileExists()) {
name.SetName(wxString::Format(wxT("%s-%d"), base.c_str(), i++));
name.SetName(wxString::Format(wxT("%s-%d"), base, i++));
}
}
@ -998,12 +998,12 @@ wxString ExportMultiple::MakeFileName(const wxString &input)
// TODO: For Russian langauge we should have separate cases for 2 and more than 2 letters.
if( excluded.Length() > 1 ){
// i18n-hint: The second %s gives some letters that can't be used.
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input.c_str(),
excluded.c_str());
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input,
excluded);
} else {
// i18n-hint: The second %s gives a letter that can't be used.
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use \"%s\".\nUse..."), input.c_str(),
excluded.c_str());
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use \"%s\".\nUse..."), input,
excluded);
}
AudacityTextEntryDialog dlg( this, msg, _("Save As..."), newname );

View File

@ -455,7 +455,7 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
if (!sf) {
AudacityMessageBox(wxString::Format(_("Cannot export audio to %s"),
fName.c_str()));
fName));
return ProgressResult::Cancelled;
}
// Retrieve tags if not given a set
@ -492,9 +492,9 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
ProgressDialog progress(wxFileName(fName).GetName(),
selectionOnly ?
wxString::Format(_("Exporting the selected audio as %s"),
formatStr.c_str()) :
formatStr) :
wxString::Format(_("Exporting the audio as %s"),
formatStr.c_str()));
formatStr));
while (updateResult == ProgressResult::Success) {
sf_count_t samplesWritten;
@ -518,8 +518,8 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
* is usually something unhelpful (and untranslated) like "system
* error" */
_("Error while writing %s file (disk full?).\nLibsndfile says \"%s\""),
formatStr.c_str(),
wxString::FromAscii(buffer2).c_str()));
formatStr,
wxString::FromAscii(buffer2)));
updateResult = ProgressResult::Cancelled;
break;
}

View File

@ -352,7 +352,7 @@ bool Importer::Import(const wxString &fName,
#ifdef USE_MIDI
// MIDI files must be imported, not opened
if (IsMidi(fName)) {
errorMessage.Printf(_("\"%s\" \nis a MIDI file, not an audio file. \nAudacity cannot open this type of file for playing, but you can\nedit it by clicking File > Import > MIDI."), fName.c_str());
errorMessage.Printf(_("\"%s\" \nis a MIDI file, not an audio file. \nAudacity cannot open this type of file for playing, but you can\nedit it by clicking File > Import > MIDI."), fName);
return false;
}
#endif
@ -376,7 +376,7 @@ bool Importer::Import(const wxString &fName,
bool usersSelectionOverrides;
gPrefs->Read(wxT("/ExtendedImport/OverrideExtendedImportByOpenFileDialogChoice"), &usersSelectionOverrides, false);
wxLogDebug(wxT("LastOpenType is %s"),type.c_str());
wxLogDebug(wxT("LastOpenType is %s"),type);
wxLogDebug(wxT("OverrideExtendedImportByOpenFileDialogChoice is %i"),usersSelectionOverrides);
if (usersSelectionOverrides)
@ -386,14 +386,14 @@ bool Importer::Import(const wxString &fName,
if (plugin->GetPluginFormatDescription().CompareTo(type) == 0)
{
// This plugin corresponds to user-selected filter, try it first.
wxLogDebug(wxT("Inserting %s"),plugin->GetPluginStringID().c_str());
wxLogDebug(wxT("Inserting %s"),plugin->GetPluginStringID());
importPlugins.insert(importPlugins.begin(), plugin.get());
}
}
}
wxLogMessage(wxT("File name is %s"),(const char *) fName.c_str());
wxLogMessage(wxT("Mime type is %s"),(const char *) mime_type.Lower().c_str());
wxLogMessage(wxT("File name is %s"), fName);
wxLogMessage(wxT("Mime type is %s"), mime_type.Lower());
for (const auto &uItem : mExtImportItems)
{
@ -402,7 +402,7 @@ bool Importer::Import(const wxString &fName,
wxLogDebug(wxT("Testing extensions"));
for (size_t j = 0; j < item->extensions.Count(); j++)
{
wxLogDebug(wxT("%s"), (const char *) item->extensions[j].Lower().c_str());
wxLogDebug(wxT("%s"), item->extensions[j].Lower());
if (wxMatchWild (item->extensions[j].Lower(),fName.Lower(), false))
{
wxLogDebug(wxT("Match!"));
@ -443,7 +443,7 @@ bool Importer::Import(const wxString &fName,
// is still ffmpeg in prefs from previous --with-ffmpeg builds
if (!(item->filter_objects[j]))
continue;
wxLogDebug(wxT("Inserting %s"),item->filter_objects[j]->GetPluginStringID().c_str());
wxLogDebug(wxT("Inserting %s"),item->filter_objects[j]->GetPluginStringID());
importPlugins.push_back(item->filter_objects[j]);
}
}
@ -482,11 +482,11 @@ bool Importer::Import(const wxString &fName,
if (importPlugins.end() ==
std::find(importPlugins.begin(), importPlugins.end(), libsndfilePlugin))
{
wxLogDebug(wxT("Appending %s"),libsndfilePlugin->GetPluginStringID().c_str());
wxLogDebug(wxT("Appending %s"),libsndfilePlugin->GetPluginStringID());
importPlugins.push_back(libsndfilePlugin);
}
}
wxLogDebug(wxT("Appending %s"),plugin->GetPluginStringID().c_str());
wxLogDebug(wxT("Appending %s"),plugin->GetPluginStringID());
importPlugins.push_back(plugin.get());
}
}
@ -504,7 +504,7 @@ bool Importer::Import(const wxString &fName,
if (importPlugins.end() ==
std::find(importPlugins.begin(), importPlugins.end(), plugin.get()))
{
wxLogDebug(wxT("Appending %s"),plugin->GetPluginStringID().c_str());
wxLogDebug(wxT("Appending %s"),plugin->GetPluginStringID());
importPlugins.push_back(plugin.get());
}
}
@ -514,11 +514,11 @@ bool Importer::Import(const wxString &fName,
for (const auto plugin : importPlugins)
{
// Try to open the file with this plugin (probe it)
wxLogMessage(wxT("Opening with %s"),plugin->GetPluginStringID().c_str());
wxLogMessage(wxT("Opening with %s"),plugin->GetPluginStringID());
auto inFile = plugin->Open(fName);
if ( (inFile != NULL) && (inFile->GetStreamCount() > 0) )
{
wxLogMessage(wxT("Open(%s) succeeded"),(const char *) fName.c_str());
wxLogMessage(wxT("Open(%s) succeeded"), fName);
// File has more than one stream - display stream selector
if (inFile->GetStreamCount() > 1)
{
@ -572,7 +572,7 @@ bool Importer::Import(const wxString &fName,
{
errorMessage.Printf(_("This version of Audacity was not compiled with %s support."),
unusableImportPlugin->
GetPluginFormatDescription().c_str());
GetPluginFormatDescription());
return false;
}
}
@ -584,80 +584,80 @@ bool Importer::Import(const wxString &fName,
// if someone has sent us a .cda file, send them away
if (extension.IsSameAs(wxT("cda"), false)) {
/* i18n-hint: %s will be the filename */
errorMessage.Printf(_("\"%s\" is an audio CD track. \nAudacity cannot open audio CDs directly. \nExtract (rip) the CD tracks to an audio format that \nAudacity can import, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is an audio CD track. \nAudacity cannot open audio CDs directly. \nExtract (rip) the CD tracks to an audio format that \nAudacity can import, such as WAV or AIFF."), fName);
return false;
}
// playlist type files
if ((extension.IsSameAs(wxT("m3u"), false))||(extension.IsSameAs(wxT("ram"), false))||(extension.IsSameAs(wxT("pls"), false))) {
errorMessage.Printf(_("\"%s\" is a playlist file. \nAudacity cannot open this file because it only contains links to other files. \nYou may be able to open it in a text editor and download the actual audio files."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a playlist file. \nAudacity cannot open this file because it only contains links to other files. \nYou may be able to open it in a text editor and download the actual audio files."), fName);
return false;
}
//WMA files of various forms
if ((extension.IsSameAs(wxT("wma"), false))||(extension.IsSameAs(wxT("asf"), false))) {
errorMessage.Printf(_("\"%s\" is a Windows Media Audio file. \nAudacity cannot open this type of file due to patent restrictions. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a Windows Media Audio file. \nAudacity cannot open this type of file due to patent restrictions. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
//AAC files of various forms (probably not encrypted)
if ((extension.IsSameAs(wxT("aac"), false))||(extension.IsSameAs(wxT("m4a"), false))||(extension.IsSameAs(wxT("m4r"), false))||(extension.IsSameAs(wxT("mp4"), false))) {
errorMessage.Printf(_("\"%s\" is an Advanced Audio Coding file. \nAudacity cannot open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is an Advanced Audio Coding file. \nAudacity cannot open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
// encrypted itunes files
if ((extension.IsSameAs(wxT("m4p"), false))) {
errorMessage.Printf(_("\"%s\" is an encrypted audio file. \nThese typically are from an online music store. \nAudacity cannot open this type of file due to the encryption. \nTry recording the file into Audacity, or burn it to audio CD then \nextract the CD track to a supported audio format such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is an encrypted audio file. \nThese typically are from an online music store. \nAudacity cannot open this type of file due to the encryption. \nTry recording the file into Audacity, or burn it to audio CD then \nextract the CD track to a supported audio format such as WAV or AIFF."), fName);
return false;
}
// Real Inc. files of various sorts
if ((extension.IsSameAs(wxT("ra"), false))||(extension.IsSameAs(wxT("rm"), false))||(extension.IsSameAs(wxT("rpm"), false))) {
errorMessage.Printf(_("\"%s\" is a RealPlayer media file. \nAudacity cannot open this proprietary format. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a RealPlayer media file. \nAudacity cannot open this proprietary format. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
// Other notes-based formats
if ((extension.IsSameAs(wxT("kar"), false))||(extension.IsSameAs(wxT("mod"), false))||(extension.IsSameAs(wxT("rmi"), false))) {
errorMessage.Printf(_("\"%s\" is a notes-based file, not an audio file. \nAudacity cannot open this type of file. \nTry converting it to an audio file such as WAV or AIFF and \nthen import it, or record it into Audacity."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a notes-based file, not an audio file. \nAudacity cannot open this type of file. \nTry converting it to an audio file such as WAV or AIFF and \nthen import it, or record it into Audacity."), fName);
return false;
}
// MusePack files
if ((extension.IsSameAs(wxT("mp+"), false))||(extension.IsSameAs(wxT("mpc"), false))||(extension.IsSameAs(wxT("mpp"), false))) {
errorMessage.Printf(_("\"%s\" is a Musepack audio file. \nAudacity cannot open this type of file. \nIf you think it might be an mp3 file, rename it to end with \".mp3\" \nand try importing it again. Otherwise you need to convert it to a supported audio \nformat, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a Musepack audio file. \nAudacity cannot open this type of file. \nIf you think it might be an mp3 file, rename it to end with \".mp3\" \nand try importing it again. Otherwise you need to convert it to a supported audio \nformat, such as WAV or AIFF."), fName);
return false;
}
// WavPack files
if ((extension.IsSameAs(wxT("wv"), false))||(extension.IsSameAs(wxT("wvc"), false))) {
errorMessage.Printf(_("\"%s\" is a Wavpack audio file. \nAudacity cannot open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a Wavpack audio file. \nAudacity cannot open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
// AC3 files
if ((extension.IsSameAs(wxT("ac3"), false))) {
errorMessage.Printf(_("\"%s\" is a Dolby Digital audio file. \nAudacity cannot currently open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a Dolby Digital audio file. \nAudacity cannot currently open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
// Speex files
if ((extension.IsSameAs(wxT("spx"), false))) {
errorMessage.Printf(_("\"%s\" is an Ogg Speex audio file. \nAudacity cannot currently open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is an Ogg Speex audio file. \nAudacity cannot currently open this type of file. \nYou need to convert it to a supported audio format, such as WAV or AIFF."), fName);
return false;
}
// Video files of various forms
if ((extension.IsSameAs(wxT("mpg"), false))||(extension.IsSameAs(wxT("mpeg"), false))||(extension.IsSameAs(wxT("avi"), false))||(extension.IsSameAs(wxT("wmv"), false))||(extension.IsSameAs(wxT("rv"), false))) {
errorMessage.Printf(_("\"%s\" is a video file. \nAudacity cannot currently open this type of file. \nYou need to extract the audio to a supported format, such as WAV or AIFF."), fName.c_str());
errorMessage.Printf(_("\"%s\" is a video file. \nAudacity cannot currently open this type of file. \nYou need to extract the audio to a supported format, such as WAV or AIFF."), fName);
return false;
}
// Audacity project
if (extension.IsSameAs(wxT("aup"), false)) {
errorMessage.Printf(_("\"%s\" is an Audacity Project file. \nUse the 'File > Open' command to open Audacity Projects."), fName.c_str());
errorMessage.Printf(_("\"%s\" is an Audacity Project file. \nUse the 'File > Open' command to open Audacity Projects."), fName);
return false;
}
// we were not able to recognize the file type
errorMessage.Printf(_("Audacity did not recognize the type of the file '%s'.\nTry installing FFmpeg. For uncompressed files, also try File > Import > Raw Data."),fName.c_str());
errorMessage.Printf(_("Audacity did not recognize the type of the file '%s'.\nTry installing FFmpeg. For uncompressed files, also try File > Import > Raw Data."),fName);
}
else
{
@ -672,7 +672,7 @@ bool Importer::Import(const wxString &fName,
pluglist = pluglist + wxT(", ") + plugin->GetPluginFormatDescription();
}
errorMessage.Printf(_("Audacity recognized the type of the file '%s'.\nImporters supposedly supporting such files are:\n%s,\nbut none of them understood this file format."),fName.c_str(), pluglist.c_str());
errorMessage.Printf(_("Audacity recognized the type of the file '%s'.\nImporters supposedly supporting such files are:\n%s,\nbut none of them understood this file format."),fName, pluglist);
}
return false;

View File

@ -365,7 +365,7 @@ bool FFmpegImportFileHandle::Init()
err = ufile_fopen_input(tempContext, mName);
if (err < 0)
{
wxLogError(wxT("FFmpeg : av_open_input_file() failed for file %s"), mName.c_str());
wxLogError(wxT("FFmpeg : av_open_input_file() failed for file %s"), mName);
return false;
}
wxASSERT(tempContext.get());
@ -374,7 +374,7 @@ bool FFmpegImportFileHandle::Init()
err = avformat_find_stream_info(mFormatContext, NULL);
if (err < 0)
{
wxLogError(wxT("FFmpeg: avformat_find_stream_info() failed for file %s"),mName.c_str());
wxLogError(wxT("FFmpeg: avformat_find_stream_info() failed for file %s"),mName);
return false;
}
@ -444,7 +444,7 @@ bool FFmpegImportFileHandle::InitCodecs()
{
lang.FromUTF8(tag->value);
}
strinfo.Printf(_("Index[%02x] Codec[%s], Language[%s], Bitrate[%s], Channels[%d], Duration[%d]"),sc->m_stream->id,codec->name,lang.c_str(),bitrate.c_str(),sc->m_stream->codec->channels, duration);
strinfo.Printf(_("Index[%02x] Codec[%s], Language[%s], Bitrate[%s], Channels[%d], Duration[%d]"),sc->m_stream->id,codec->name,lang,bitrate,sc->m_stream->codec->channels, duration);
mStreamInfo.Add(strinfo);
mScs->get()[mNumStreams++] = std::move(sc);
}

View File

@ -286,7 +286,7 @@ GetGStreamerImportPlugin(ImportPluginList &importPluginList,
{
wxLogMessage(wxT("Failed to initialize GStreamer. Error %d: %s"),
error.get()->code,
wxString::FromUTF8(error.get()->message).c_str());
wxString::FromUTF8(error.get()->message));
return;
}
@ -389,7 +389,7 @@ GStreamerImportPlugin::GetSupportedExtensions()
for (guint i = 0; extensions[i] != NULL; i++)
{
wxString extension = wxString::FromUTF8(extensions[i]);
if (mExtensions.Index(extension.c_str(), false) == wxNOT_FOUND)
if (mExtensions.Index(extension, false) == wxNOT_FOUND)
{
mExtensions.Add(extension);
}
@ -407,7 +407,7 @@ GStreamerImportPlugin::GetSupportedExtensions()
{
extensions = extensions + wxT(" ") + mExtensions[i];
}
wxLogMessage(wxT("%s"), extensions.c_str());
wxLogMessage(wxT("%s"), extensions);
return mExtensions;
}
@ -996,7 +996,7 @@ GStreamerImportFileHandle::Init()
wxString strinfo;
strinfo.Printf(wxT("Index[%02d], Type[%s], Channels[%d], Rate[%d]"),
(unsigned int) i,
wxString::FromUTF8(c->mType.get()).c_str(),
wxString::FromUTF8(c->mType.get()),
(int) c->mNumChannels,
(int) c->mSampleRate);
mStreamInfo.Add(strinfo);
@ -1210,9 +1210,9 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
}
wxLogMessage(wxT("GStreamer: Got %s%s%s"),
wxString::FromUTF8(GST_MESSAGE_TYPE_NAME(msg.get())).c_str(),
wxString::FromUTF8(GST_MESSAGE_TYPE_NAME(msg.get())),
objname ? wxT(" from ") : wxT(""),
objname ? wxString::FromUTF8(objname.get()).c_str() : wxT(""));
objname ? wxString::FromUTF8(objname.get()) : wxT(""));
}
#endif
@ -1231,13 +1231,13 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
wxString m;
m.Printf(wxT("%s%s%s"),
wxString::FromUTF8(err.get()->message).c_str(),
wxString::FromUTF8(err.get()->message),
debug ? wxT("\n") : wxT(""),
debug ? wxString::FromUTF8(debug.get()).c_str() : wxT(""));
debug ? wxString::FromUTF8(debug.get()) : wxT(""));
#if defined(_DEBUG)
AudacityMessageBox(wxString::Format(_("GStreamer Error: %s"), m));
#else
wxLogMessage(wxT("GStreamer Error: %s"), m.c_str());
wxLogMessage(wxT("GStreamer Error: %s"), m);
#endif
}
@ -1256,9 +1256,9 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
if (err)
{
wxLogMessage(wxT("GStreamer Warning: %s%s%s"),
wxString::FromUTF8(err.get()->message).c_str(),
wxString::FromUTF8(err.get()->message),
debug ? wxT("\n") : wxT(""),
debug ? wxString::FromUTF8(debug.get()).c_str() : wxT(""));
debug ? wxString::FromUTF8(debug.get()) : wxT(""));
}
}
break;
@ -1273,9 +1273,9 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
if (err)
{
wxLogMessage(wxT("GStreamer Info: %s%s%s"),
wxString::FromUTF8(err.get()->message).c_str(),
wxString::FromUTF8(err.get()->message),
debug ? wxT("\n") : wxT(""),
debug ? wxString::FromUTF8(debug.get()).c_str() : wxT(""));
debug ? wxString::FromUTF8(debug.get()) : wxT(""));
}
}
break;
@ -1375,18 +1375,18 @@ GStreamerImportFileHandle::OnTag(GstAppSink * WXUNUSED(appsink), GstTagList *tag
{
GstDateTime *dt = (GstDateTime *) g_value_get_boxed(val);
GstString str{ gst_date_time_to_iso8601_string(dt) };
string = wxString::FromUTF8(str.get()).c_str();
string = wxString::FromUTF8(str.get());
}
else if (G_VALUE_HOLDS(val, G_TYPE_DATE))
{
GstString str{ gst_value_serialize(val) };
string = wxString::FromUTF8(str.get()).c_str();
string = wxString::FromUTF8(str.get());
}
else
{
wxLogMessage(wxT("Tag %s has unhandled type: %s"),
wxString::FromUTF8(name).c_str(),
wxString::FromUTF8(G_VALUE_TYPE_NAME(val)).c_str());
wxString::FromUTF8(name),
wxString::FromUTF8(G_VALUE_TYPE_NAME(val)));
continue;
}
@ -1422,12 +1422,12 @@ GStreamerImportFileHandle::OnTag(GstAppSink * WXUNUSED(appsink), GstTagList *tag
}
else
{
tag = wxString::FromUTF8(name).c_str();
tag = wxString::FromUTF8(name);
}
if (jcnt > 1)
{
tag.Printf(wxT("%s:%d"), tag.c_str(), j);
tag.Printf(wxT("%s:%d"), tag, j);
}
// Store the tag

View File

@ -325,7 +325,7 @@ ProgressResult OggImportFileHandle::Import(TrackFactory *trackFactory, TrackHold
if (bytesRead == OV_HOLE) {
wxFileName ff(mFilename);
wxLogError(wxT("Ogg Vorbis importer: file %s is malformed, ov_read() reported a hole"),
ff.GetFullName().c_str());
ff.GetFullName());
/* http://lists.xiph.org/pipermail/vorbis-dev/2001-February/003223.html
* is the justification for doing this - best effort for malformed file,
* hence the message.

View File

@ -137,7 +137,7 @@ public:
wxFileName ff(mFilename);
wxString title;
title.Printf(_("Importing %s"), GetFileDescription().c_str());
title.Printf(_("Importing %s"), GetFileDescription());
mProgress.create(title, ff.GetFullName());
}

View File

@ -238,7 +238,7 @@ void ImportRaw(wxWindow *parent, const wxString &fileName,
wxString msg;
msg.Printf(_("Importing %s"), wxFileName::FileName(fileName).GetFullName().c_str());
msg.Printf(_("Importing %s"), wxFileName::FileName(fileName).GetFullName());
/* i18n-hint: 'Raw' means 'unprocessed' here and should usually be tanslated.*/
ProgressDialog progress(_("Import Raw"), msg);

View File

@ -334,9 +334,9 @@ void ODWaveTrackTaskQueue::FillTipForWaveTrack( const WaveTrack * t, wxString &t
// if(GetNumTasks()==1)
mTipMsg.Printf(_("%s %2.0f%% complete. Click to change task focal point."), GetFrontTask()->GetTip(), GetFrontTask()->PercentComplete()*100.0 );
// else
// msg.Printf(_("%s %d additional tasks remaining."), GetFrontTask()->GetTip().c_str(), GetNumTasks());
// msg.Printf(_("%s %d additional tasks remaining."), GetFrontTask()->GetTip(), GetNumTasks());
tip = mTipMsg.c_str();
tip = mTipMsg;
}
}

View File

@ -207,7 +207,7 @@ bool DirectoriesPrefs::Validate()
if( !AudacityApp::IsTempDirectoryNameOK( path ) ) {
AudacityMessageBox(
wxString::Format(_("Directory %s is not suitable (at risk of being cleaned out)"),
path.c_str()),
path),
_("Error"),
wxOK | wxICON_ERROR);
return false;
@ -215,7 +215,7 @@ bool DirectoriesPrefs::Validate()
if (!tempDir.DirExists()) {
int ans = AudacityMessageBox(
wxString::Format(_("Directory %s does not exist. Create it?"),
path.c_str()),
path),
_("New Temporary Directory"),
wxYES_NO | wxCENTRE | wxICON_EXCLAMATION);
@ -236,7 +236,7 @@ bool DirectoriesPrefs::Validate()
if (!tempDir.Mkdir(0755)) {
AudacityMessageBox(
wxString::Format(_("Directory %s is not writable"),
path.c_str()),
path),
_("Error"),
wxOK | wxICON_ERROR);
return false;

View File

@ -622,9 +622,9 @@ void KeyConfigPrefs::OnSet(wxCommandEvent & WXUNUSED(event))
if (AudacityMessageBox(
wxString::Format(
_("The keyboard shortcut '%s' is already assigned to:\n\n\t'%s'\n\nClick OK to assign the shortcut to\n\n\t'%s'\n\ninstead. Otherwise, click Cancel."),
key.c_str(),
oldlabel.c_str(),
newlabel.c_str()),
key,
oldlabel,
newlabel),
_("Error"), wxOK | wxCANCEL | wxICON_STOP | wxCENTRE, this) == wxCANCEL)
{
return;

View File

@ -203,8 +203,8 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
if (itemAtIndex.IsSameAs(interf)) {
wxString name = wxSafeConvertMB2WX(info->name);
wxString device = wxString::Format(wxT("%s: %s"),
interf.c_str(),
name.c_str());
interf,
name);
int index;
if (info->output) {
@ -263,16 +263,16 @@ bool MidiIOPrefs::Commit()
if (info) {
gPrefs->Write(wxT("/MidiIO/PlaybackDevice"),
wxString::Format(wxT("%s: %s"),
wxString(wxSafeConvertMB2WX(info->interf)).c_str(),
wxString(wxSafeConvertMB2WX(info->name)).c_str()));
wxString(wxSafeConvertMB2WX(info->interf)),
wxString(wxSafeConvertMB2WX(info->name))));
}
#ifdef EXPERIMENTAL_MIDI_IN
info = (const PmDeviceInfo *) mRecord->GetClientData(mRecord->GetSelection());
if (info) {
gPrefs->Write(wxT("/MidiIO/RecordingDevice"),
wxString::Format(wxT("%s: %s"),
wxString(wxSafeConvertMB2WX(info->interf)).c_str(),
wxString(wxSafeConvertMB2WX(info->name)).c_str()));
wxString(wxSafeConvertMB2WX(info->interf)),
wxString(wxSafeConvertMB2WX(info->name))));
}
#endif
return gPrefs->Flush();

View File

@ -70,7 +70,7 @@ void ModulePrefs::GetAllModuleStatuses(){
iStatus = kModuleNew;
gPrefs->Write( str, iStatus );
}
//wxLogDebug( wxT("Entry: %s Value: %i"), str.c_str(), iStatus );
//wxLogDebug( wxT("Entry: %s Value: %i"), str, iStatus );
mModules.Add( str );
mStatuses.Add( iStatus );
mPaths.Add( fname );

View File

@ -435,7 +435,7 @@ void SelectionBar::RegenerateTooltips()
{
#if wxUSE_TOOLTIPS
wxString formatName = mListener ? mListener->AS_GetSelectionFormat() : wxString(wxEmptyString);
mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), formatName.c_str()));
mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), formatName));
#endif
}

View File

@ -346,7 +346,7 @@ ToolBar::~ToolBar()
wxString ToolBar::GetTitle()
{
/* i18n-hint: %s will be replaced by the name of the kind of toolbar.*/
return wxString::Format( _("Audacity %s Toolbar"), GetLabel().c_str() );
return wxString::Format( _("Audacity %s Toolbar"), GetLabel() );
}
//

View File

@ -223,8 +223,7 @@ void WaveColorMenuTable::OnWaveColorChange(wxCommandEvent & event)
partner->SetWaveColorIndex(newWaveColor);
project->PushState(wxString::Format(_("Changed '%s' to %s"),
pTrack->GetName().
c_str(),
pTrack->GetName(),
GetWaveColorStr(newWaveColor)),
_("WaveColor Change"));
@ -345,8 +344,7 @@ void FormatMenuTable::OnFormatChange(wxCommandEvent & event)
partner->ConvertToSampleFormat(newFormat);
project->PushState(wxString::Format(_("Changed '%s' to %s"),
pTrack->GetName().
c_str(),
pTrack->GetName(),
GetSampleFormatStr(newFormat)),
_("Format Change"));
@ -448,7 +446,7 @@ void RateMenuTable::SetRate(WaveTrack * pTrack, double rate)
// Separate conversion of "rate" enables changing the decimals without affecting i18n
wxString rateString = wxString::Format(wxT("%.3f"), rate);
project->PushState(wxString::Format(_("Changed '%s' to %s Hz"),
pTrack->GetName().c_str(), rateString.c_str()),
pTrack->GetName(), rateString),
_("Rate Change"));
}
@ -837,7 +835,7 @@ void WaveTrackMenuTable::OnChannelChange(wxCommandEvent & event)
pTrack->SetChannel(channel);
AudacityProject *const project = ::GetActiveProject();
project->PushState(wxString::Format(_("Changed '%s' to %s"),
pTrack->GetName().c_str(),
pTrack->GetName(),
channelmsg),
_("Channel"));
mpData->result = RefreshCode::RefreshAll;
@ -891,8 +889,7 @@ void WaveTrackMenuTable::OnMergeStereo(wxCommandEvent &)
AudacityProject *const project = ::GetActiveProject();
project->PushState(wxString::Format(_("Made '%s' a stereo track"),
pTrack->GetName().
c_str()),
pTrack->GetName()),
_("Make Stereo"));
}
else
@ -985,7 +982,7 @@ void WaveTrackMenuTable::OnSwapChannels(wxCommandEvent &)
project->GetTrackPanel()->SetFocusedTrack(partner);
project->PushState(wxString::Format(_("Swapped Channels in '%s'"),
pTrack->GetName().c_str()),
pTrack->GetName()),
_("Swap Channels"));
mpData->result = RefreshCode::RefreshAll;
@ -998,7 +995,7 @@ void WaveTrackMenuTable::OnSplitStereo(wxCommandEvent &)
WaveTrack *const pTrack = static_cast<WaveTrack*>(mpData->pTrack);
AudacityProject *const project = ::GetActiveProject();
project->PushState(wxString::Format(_("Split stereo track '%s'"),
pTrack->GetName().c_str()),
pTrack->GetName()),
_("Split"));
mpData->result = RefreshCode::RefreshAll;
@ -1011,7 +1008,7 @@ void WaveTrackMenuTable::OnSplitStereoMono(wxCommandEvent &)
WaveTrack *const pTrack = static_cast<WaveTrack*>(mpData->pTrack);
AudacityProject *const project = ::GetActiveProject();
project->PushState(wxString::Format(_("Split Stereo to Mono '%s'"),
pTrack->GetName().c_str()),
pTrack->GetName()),
_("Split to Mono"));
mpData->result = RefreshCode::RefreshAll;

View File

@ -924,7 +924,7 @@ HitTestPreview SelectHandle::Preview
/* i18n-hint: %s is usually replaced by "Ctrl+P" for Windows/Linux, "Command+," for Mac */
tip = wxString::Format(
_("Multi-Tool Mode: %s for Mouse and Keyboard Preferences."),
keyStr.c_str());
keyStr);
// Later in this function we may point to some other string instead.
if (!pTrack->GetSelected() ||
!viewInfo.bAdjustSelectionEdges)

View File

@ -886,7 +886,7 @@ UIHandle::Result TimeShiftHandle::Release
_("left");
/* i18n-hint: %s is a direction like left or right */
msg.Printf(_("Time shifted tracks/clips %s %.02f seconds"),
direction.c_str(), fabs( mClipMoveState.hSlideAmount ));
direction, fabs( mClipMoveState.hSlideAmount ));
consolidate = true;
}
pProject->PushState(msg, _("Time-Shift"),

View File

@ -176,8 +176,8 @@ void TrackMenuTable::OnSetName(wxCommandEvent &)
pMixerBoard->UpdateName(pt);
proj->PushState(wxString::Format(_("Renamed '%s' to '%s'"),
oldName.c_str(),
newName.c_str()),
oldName,
newName),
_("Name Change"));
mpData->result = RefreshCode::RefreshAll;

View File

@ -192,8 +192,8 @@ UIHandle::Result TrackSelectHandle::Release
dir = mRearrangeCount < 0 ? _("up") : _("down");
/* i18n-hint: will substitute name of track for first %s, "up" or "down" for the other.*/
project->PushState(wxString::Format(_("Moved '%s' %s"),
mpTrack->GetName().c_str(),
dir.c_str()),
mpTrack->GetName(),
dir),
_("Move Track"));
}
// Bug 1677

View File

@ -999,7 +999,7 @@ wxString LWSlider::GetTip(float value) const
#endif
}
label.Printf(wxT("%s: %s"), mName.c_str(), val.c_str());
label.Printf(wxT("%s: %s"), mName, val);
}
else
{
@ -1042,7 +1042,7 @@ wxString LWSlider::GetMaxTip() const
#endif
}
label.Printf(wxT("%s: %s"), mName.c_str(), val.c_str());
label.Printf(wxT("%s: %s"), mName, val);
}
else
{

View File

@ -361,9 +361,9 @@ void HelpSystem::ShowHelp(wxWindow *parent,
#endif
wxLogMessage(wxT("Help button pressed: PageName %s, releasePageName %s"),
PageName.c_str(), releasePageName.c_str());
PageName, releasePageName);
wxLogMessage(wxT("webHelpPage %s, localHelpPage %s"),
webHelpPage.c_str(), localHelpPage.c_str());
webHelpPage, localHelpPage);
wxASSERT(parent); // to justify safenew

View File

@ -715,10 +715,10 @@ KeyView::RefreshBindings(const wxArrayString & names,
node.isparent,
node.iscat,
node.ispfx,
node.name.c_str(),
node.category.c_str(),
node.prefix.c_str(),
node.label.c_str());
node.name,
node.category,
node.prefix,
node.label);
}
#endif
@ -969,10 +969,10 @@ KeyView::RefreshLines(bool bSort)
node.isparent,
node.iscat,
node.ispfx,
node.name.c_str(),
node.category.c_str(),
node.prefix.c_str(),
node.label.c_str());
node.name,
node.category,
node.prefix,
node.label);
}
#endif

View File

@ -142,7 +142,7 @@ bool MeterUpdateQueue::Put(MeterUpdateMsg &msg)
if (len >= (int)(mBufferSize-1))
return false;
//wxLogDebug(wxT("Put: %s"), msg.toString().c_str());
//wxLogDebug(wxT("Put: %s"), msg.toString());
mBuffer[mEnd] = msg;
mEnd = (mEnd+1)%mBufferSize;

View File

@ -669,7 +669,7 @@ wxString Ruler::LabelString(double d, bool major)
wxString t1, t2, format;
t1.Printf(wxT("%d:%02d:"), secs/3600, (secs/60)%60);
format.Printf(wxT("%%0%d.%dlf"), mDigits+3, mDigits);
t2.Printf(format.c_str(), fmod(d, 60.0));
t2.Printf(format, fmod(d, 60.0));
s += t1 + t2;
}
break;
@ -722,7 +722,7 @@ wxString Ruler::LabelString(double d, bool major)
format.Printf(wxT("%%%d.%dlf"), mDigits+3, mDigits);
// The casting to float is working around an issue where 59 seconds
// would show up as 60 when using g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3.
t2.Printf(format.c_str(), fmod((float)d, (float)60.0));
t2.Printf(format, fmod((float)d, (float)60.0));
#else
// For d in the range of hours, d is just very slightly below the value it should
// have, because of using a double, which in turn yields values like 59:59:999999
@ -747,7 +747,7 @@ wxString Ruler::LabelString(double d, bool major)
// doesn't round up 59.9999999 to 60.
double multiplier = pow( 10, mDigits);
dd = ((int)(dd * multiplier))/multiplier;
t2.Printf(format.c_str(), dd);
t2.Printf(format, dd);
#endif
s += t1 + t2;
}

View File

@ -207,7 +207,7 @@ void NumberFormatter::RemoveTrailingZeroes(wxString& s, size_t retain /* = 0 */)
{
const size_t posDecSep = s.find(GetDecimalSeparator());
wxCHECK_RET( posDecSep != wxString::npos,
wxString::Format(wxT("No decimal separator in \"%s\""), s.c_str()) );
wxString::Format(wxT("No decimal separator in \"%s\""), s) );
wxCHECK_RET( posDecSep, wxT("Can't start with decimal separator" ));
// Find the last character to keep.

View File

@ -43,7 +43,7 @@ bool XMLFileReader::Parse(XMLTagHandler *baseHandler,
{
wxFFile theXMLFile(fname, wxT("rb"));
if (!theXMLFile.IsOpened()) {
mErrorStr.Printf(_("Could not open file: \"%s\""), fname.c_str());
mErrorStr.Printf(_("Could not open file: \"%s\""), fname);
return false;
}
@ -72,7 +72,7 @@ bool XMLFileReader::Parse(XMLTagHandler *baseHandler,
if (mBaseHandler)
return true;
else {
mErrorStr.Printf(_("Could not load file: \"%s\""), fname.c_str());
mErrorStr.Printf(_("Could not load file: \"%s\""), fname);
return false;
}
}

View File

@ -194,18 +194,18 @@ bool XMLTagHandler::ReadXMLTag(const char *tag, const char **attrs)
// added by a cast after creating the array of pointers-to-non-const chars.
auto out_attrs = std::make_unique<const wxChar *[]>(tmp_attrs.GetCount() + 1);
for (size_t i=0; i<tmp_attrs.GetCount(); i++) {
out_attrs[i] = tmp_attrs[i].c_str();
out_attrs[i] = tmp_attrs[i];
}
out_attrs[tmp_attrs.GetCount()] = 0;
bool result = HandleXMLTag(UTF8CTOWX(tag).c_str(), out_attrs.get());
bool result = HandleXMLTag(UTF8CTOWX(tag), out_attrs.get());
return result;
}
void XMLTagHandler::ReadXMLEndTag(const char *tag)
{
HandleXMLEndTag(UTF8CTOWX(tag).c_str());
HandleXMLEndTag(UTF8CTOWX(tag));
}
void XMLTagHandler::ReadXMLContent(const char *s, int len)
@ -215,5 +215,5 @@ void XMLTagHandler::ReadXMLContent(const char *s, int len)
XMLTagHandler *XMLTagHandler::ReadXMLChild(const char *tag)
{
return HandleXMLChild(UTF8CTOWX(tag).c_str());
return HandleXMLChild(UTF8CTOWX(tag));
}

View File

@ -89,7 +89,7 @@ void XMLWriter::StartTag(const wxString &name)
Write(wxT("\t"));
}
Write(wxString::Format(wxT("<%s"), name.c_str()));
Write(wxString::Format(wxT("<%s"), name));
mTagstack.Insert(name, 0);
mHasKids[0] = true;
@ -113,7 +113,7 @@ void XMLWriter::EndTag(const wxString &name)
for (i = 0; i < mDepth - 1; i++) {
Write(wxT("\t"));
}
Write(wxString::Format(wxT("</%s>\n"), name.c_str()));
Write(wxString::Format(wxT("</%s>\n"), name));
}
}
else {
@ -132,8 +132,8 @@ void XMLWriter::WriteAttr(const wxString &name, const wxString &value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%s\""),
name.c_str(),
XMLEsc(value).c_str()));
name,
XMLEsc(value)));
}
void XMLWriter::WriteAttr(const wxString &name, const wxChar *value)
@ -146,7 +146,7 @@ void XMLWriter::WriteAttr(const wxString &name, int value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%d\""),
name.c_str(),
name,
value));
}
@ -154,7 +154,7 @@ void XMLWriter::WriteAttr(const wxString &name, bool value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%d\""),
name.c_str(),
name,
value));
}
@ -162,7 +162,7 @@ void XMLWriter::WriteAttr(const wxString &name, long value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%ld\""),
name.c_str(),
name,
value));
}
@ -170,7 +170,7 @@ void XMLWriter::WriteAttr(const wxString &name, long long value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%lld\""),
name.c_str(),
name,
value));
}
@ -178,7 +178,7 @@ void XMLWriter::WriteAttr(const wxString &name, size_t value)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%lld\""),
name.c_str(),
name,
(long long) value));
}
@ -186,16 +186,16 @@ void XMLWriter::WriteAttr(const wxString &name, float value, int digits)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%s\""),
name.c_str(),
Internat::ToString(value, digits).c_str()));
name,
Internat::ToString(value, digits)));
}
void XMLWriter::WriteAttr(const wxString &name, double value, int digits)
// may throw from Write()
{
Write(wxString::Format(wxT(" %s=\"%s\""),
name.c_str(),
Internat::ToString(value, digits).c_str()));
name,
Internat::ToString(value, digits)));
}
void XMLWriter::WriteData(const wxString &value)
@ -219,7 +219,7 @@ void XMLWriter::WriteSubTree(const wxString &value)
mHasKids[0] = true;
}
Write(value.c_str());
Write(value);
}
// See http://www.w3.org/TR/REC-xml for reference