mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user