- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
The toggle to switch the extra menu(s) on or off still says 'menus' (plural). Decided not to change it as the submenus count as 'menus'. Also we may later add extra menus to the track drop down and in other places.
Currently, when Audacity exports labels tracks numbers are formatted
with the "%f" specifier, which relies on the current user locale to pick
up the decimal separator.
This means that the numbers indicating the start and the end of the
labeled interval could end up using a comma as a decimal separator.
This makes the exported file less portable, especially in the case of
parsing the exported file with an external tool.
Audacity is already able to _import_ labels tracks independently of the
locale because it uses Internat::CompatibleToDouble(), so do something
symmetric at _export_ time, using Internat::ToString() to make the
exported data locale-independent (i.e. always using a dot as the decimal
separator).
Proposed in https://sourceforge.net/p/audacity/mailman/message/35534945/
NOTE:
When converting numbers to strings FLT_DIG is passed as the
digitsAfterDecimalPoint argument of Internat::ToString(), this is in
order to preserve the look and the alignment of the previous "%f" format
specifier; without that Internat::ToString() would strip trailing zeros.
Audacity requires C++11, this ensures that FLT_DIG is defined.
... Such projects as described in
http://forum.audacityteam.org/viewtopic.php?f=47&t=97787
(That thread did not describe the crashes, but I came across them, debugging,
or deduced the possibility of them)
In which all the shared_ptrs to BlockFile objects ended up pointing at one
common file; but the size of this file was sometimes larger than the
Sequence's maximum block size, or not the same as the difference between one
block's start offset and the next one's.
... That for SetSamples was too strict, making needless errors in case of
harmless zero-length clips.
The one for Get was analogous to SetSamples.
That for Delete was too lax. But reexamination shows the stricter condition
to be satisfied in all calls. Sequence::Delete() can be reached only from
WaveClip::Clear and WaveClip::ClearAndAddCutLine(), and all calls to those
are in WaveTrack.cpp.
... The keys are only ever used as internal identifiers in wxConfigFile
objects. So they are often space-less and camel-cased.
I have noticed a couple instances of translators confused by these.