mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-15 16:17:41 +02:00
make Label exports a native (LF-terminated) text file rather than Mac Classic (CR-terminated) one, as it's more compatible with the rest of the platform (and the Wx default). Also create file directly on all platforms - no reason why Mac needs a special case with current wx. This code has been this way for many years, the original reason is long gone.
This commit is contained in:
parent
5918ad671d
commit
507bc713a7
@ -2932,13 +2932,7 @@ void AudacityProject::OnExportLabels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxTextFile f(fName);
|
wxTextFile f(fName);
|
||||||
#ifdef __WXMAC__
|
|
||||||
wxFile *temp = new wxFile();
|
|
||||||
temp->Create(fName);
|
|
||||||
delete temp;
|
|
||||||
#else
|
|
||||||
f.Create();
|
f.Create();
|
||||||
#endif
|
|
||||||
f.Open();
|
f.Open();
|
||||||
if (!f.IsOpened()) {
|
if (!f.IsOpened()) {
|
||||||
wxMessageBox(_("Couldn't write to file: ") + fName);
|
wxMessageBox(_("Couldn't write to file: ") + fName);
|
||||||
@ -2953,11 +2947,7 @@ void AudacityProject::OnExportLabels()
|
|||||||
t = iter.Next();
|
t = iter.Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
|
||||||
f.Write(wxTextFileType_Mac);
|
|
||||||
#else
|
|
||||||
f.Write();
|
f.Write();
|
||||||
#endif
|
|
||||||
f.Close();
|
f.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user