... not member functions of AudacityProject
This puts DirManager.cpp and four others back into the big strongly connected
component of link dependencies. They will break out again when Project.cpp
becomes a low-level file.
... Unnecessary because transitively included.
But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
... 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.
Fix affects windows only.
In the case of Save and SaveAs creates the directory too, so that the dialog can be positioned there.
For Export Multiple, will prompt if the directory does not exist.
Bug no longer moonphase when exporting stereo. Iterator is iterating through channels, not tracks, so we need to allow for that when we skip whole tracks.
Previously the dialog listed multiple characters that are disallowed. On Mac, only ":" is disallowed, so the text in that case can't say "any of" without looking funny.
... And in some places where a library uses signed types, assert that
the reported number is not negative.
What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
Correct string formatting for:
2/15 %d + enum => %d + int
3/15 %lld + int64_t => %lld + long long
4/15 %d + int64_t => %lld + long long
5/15 %d + double => %f + double
6/15 %d + int32_t => %d + int
7/15 %d + intptr_t => %p + void*
8/15 gint, guint
9/15 %d + long => %ld + long
10/15 %n + int => %d + int
11/15 %x + int => %x + unsigned int
12/15 %f + int => %d + int
13/15 %S + wxChar* => %s + wxChar*
14/15 %d + size_t => %d + int
15/15 %d + size_t => %lld + long long
"The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match."
Note (9/15): In TrackPanel.cpp, ExportMP2.cpp and CompareAudioCommand.cpp this patch supersedes related change done in r13466 because the new solution requires fewer casts and therefore simplifies the code.
Note: Many .po files are affected, and we need to be very careful about this. Incorrect "%d" and similar in translation files may lead to crashes in those languages (only). This is something we should actually have been more careful about in the past. We need to write a script to check that the "%d" and similar format specifiers match between English and translation.
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 change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
* "Open Me&tadata Editor..." -> "Edit Me&tadata..." because it's more concise, matches other occurrences, and eliminates any confusion about file opening.
* In AudacityProject::OnEditMetadata(), "Edit the metadata tags" -> "Edit Metadata Tags": more concise, and brings in line with capitalization standard for dialog titles.
* Likewise for capitalization in other invocations of ShowEditDialog in ExportMultiple.
* In TagsEditor::PopulateOrExchange(), "RETURN key" -> "ENTER key" because I don't recall ever seeing a Return key on a comnputer (!).
* "Using Label/Track Name" is default again
* Clearer wording for the two different "numbering" options, both of which now use two-digit numbering
* Last used "Name files" radio button is remembered and written to .cfg (patch by Ed)