mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Patch provided by Rob (RPM) to resolve many of the wx3 format string assertions
He wanted to help so I asked if he wanted to track them down. He agreed and found more than I probably would have. And he said there were more, but the rest were questionable and since he works on Windows, wasn't able to actually test. I give a few of the ones he did find a go and they do indeed get rid of the assertions. (Basically, a 64-bit/32-bit issue, easily resolved with a typecast.)
This commit is contained in:
parent
3361b7e61b
commit
1b993ccd08
@ -189,7 +189,7 @@ bool Shuttle::TransferLongLong( const wxString & Name, wxLongLong_t & iValue, co
|
||||
else
|
||||
{
|
||||
/// \todo Fix for long long values.
|
||||
mValueString = wxString::Format(wxT("%d"),iValue);
|
||||
mValueString = wxString::Format(wxT("%d"),(int) iValue);
|
||||
return ExchangeWithMaster( Name );
|
||||
}
|
||||
return true;
|
||||
|
@ -8431,8 +8431,8 @@ void TrackPanel::OnSetTimeTrackRange(wxCommandEvent & /*event*/)
|
||||
t->SetRangeLower((double)lower / 100.0);
|
||||
t->SetRangeUpper((double)upper / 100.0);
|
||||
MakeParentPushState(wxString::Format(_("Set range to '%d' - '%d'"),
|
||||
lower,
|
||||
upper),
|
||||
(int) lower,
|
||||
(int) upper),
|
||||
/* i18n-hint: (verb)*/
|
||||
|
||||
_("Set Range"));
|
||||
@ -8687,7 +8687,7 @@ void TrackPanel::OnSetFont(wxCommandEvent & WXUNUSED(event))
|
||||
/* i18n-hint: (noun) The size of the typeface*/
|
||||
S.AddPrompt(_("Face size"));
|
||||
sc = new wxSpinCtrl(&dlg, wxID_ANY,
|
||||
wxString::Format(wxT("%d"), fontsize),
|
||||
wxString::Format(wxT("%d"), (int) fontsize),
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxSP_ARROW_KEYS,
|
||||
|
@ -135,8 +135,8 @@ bool CompareAudioCommand::Apply(CommandExecutionContext context)
|
||||
|
||||
// Output the results
|
||||
double errorSeconds = mTrack0->LongSamplesToTime(errorCount);
|
||||
Status(wxString::Format(wxT("%i"), errorCount));
|
||||
Status(wxString::Format(wxT("%i"), (int) errorCount));
|
||||
Status(wxString::Format(wxT("%.4f"), errorSeconds));
|
||||
Status(wxString::Format(wxT("Finished comparison: %i samples (%.3f seconds) exceeded the error threshold of %f."), errorCount, errorSeconds, errorThreshold));
|
||||
Status(wxString::Format(wxT("Finished comparison: %i samples (%.3f seconds) exceeded the error threshold of %f."), (int) errorCount, errorSeconds, errorThreshold));
|
||||
return true;
|
||||
}
|
||||
|
@ -714,13 +714,13 @@ bool CompressorDialog::TransferDataFromWindow()
|
||||
mPanel->noisefloor = noisefloor;
|
||||
mPanel->ratio = ratio;
|
||||
|
||||
mThresholdLabel->SetName(wxString::Format(_("Threshold %d dB"), (int)threshold));
|
||||
mThresholdLabel->SetName(wxString::Format(_("Threshold %d dB"), (int) threshold));
|
||||
/* i18n-hint: usually leave this as is as dB doesn't get translated*/
|
||||
mThresholdText->SetLabel(wxString::Format(_("%3d dB"), (int)threshold));
|
||||
mThresholdText->SetLabel(wxString::Format(_("%3d dB"), (int) threshold));
|
||||
mThresholdText->SetName(mThresholdText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
|
||||
mNoiseFloorLabel->SetName(wxString::Format(_("Noise Floor %d dB"), (int)noisefloor));
|
||||
mNoiseFloorText->SetLabel(wxString::Format(_("%3d dB"), (int)noisefloor));
|
||||
mNoiseFloorLabel->SetName(wxString::Format(_("Noise Floor %d dB"), (int) noisefloor));
|
||||
mNoiseFloorText->SetLabel(wxString::Format(_("%3d dB"), (int) noisefloor));
|
||||
mNoiseFloorText->SetName(mNoiseFloorText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
|
||||
if (mRatioSlider->GetValue()%2 == 0) {
|
||||
|
@ -147,7 +147,7 @@ static void LoadLadspaEffect(wxSortedArrayString &uniq, wxString fname,
|
||||
data = mainFn(index);
|
||||
while(data) {
|
||||
|
||||
wxString uniqid = wxString::Format(wxT("%08x-%s"), data->UniqueID, LAT1CTOWX(data->Label).c_str());
|
||||
wxString uniqid = wxString::Format(wxT("%08x-%s"), (int)data->UniqueID, LAT1CTOWX(data->Label).c_str());
|
||||
if (uniq.Index(uniqid) == wxNOT_FOUND) {
|
||||
uniq.Add(uniqid);
|
||||
std::set<wxString> categories;
|
||||
|
@ -276,8 +276,8 @@ int ExportMP2::Export(AudacityProject *project,
|
||||
|
||||
ProgressDialog *progress = new ProgressDialog(wxFileName(fName).GetName(),
|
||||
selectionOnly ?
|
||||
wxString::Format(_("Exporting selected audio at %d kbps"), bitrate) :
|
||||
wxString::Format(_("Exporting entire file at %d kbps"), bitrate));
|
||||
wxString::Format(_("Exporting selected audio at %d kbps"), (int) bitrate) :
|
||||
wxString::Format(_("Exporting entire file at %d kbps"), (int) bitrate));
|
||||
|
||||
int updateResult = eProgressSuccess;
|
||||
while(updateResult == eProgressSuccess) {
|
||||
|
@ -787,7 +787,8 @@ int ExportMultiple::ExportMultipleByTrack(bool byName,
|
||||
if (byName) {
|
||||
name = title;
|
||||
if (addNumber) {
|
||||
name.Prepend(wxString::Format(wxT("%02d-"), l+1));
|
||||
name.Prepend(
|
||||
wxString::Format(wxT("%02d-"), l+1));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1487,7 +1487,7 @@ void Meter::OnPreferences(wxCommandEvent & WXUNUSED(event))
|
||||
S.StartHorizontalLay();
|
||||
{
|
||||
rate = S.AddTextBox(_("Meter refresh rate per second [1-100]: "),
|
||||
wxString::Format(wxT("%d"), mMeterRefreshRate),
|
||||
wxString::Format(wxT("%d"), (int) mMeterRefreshRate),
|
||||
10);
|
||||
rate->SetName(_("Meter refresh rate per second [1-100]"));
|
||||
wxIntegerValidator<long> vld(&mMeterRefreshRate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user