mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-07 20:22:13 +01: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user