Changes in AudacityProject::SaveAs() warning dialogs, per 'Save Project warning' discussion on audacity-quality, plus some further changes of my own.
Similar changes for 'Save Compressed Project'.
Added Cancel button to both warnings, so user can opt out immediately, rather than have to wait another dialog.
Added wxMessageBox's best 'warning' icon to our WarningDialog constructor, so it shows in title bar. It's low-rez (32x32), but all that's available with wxWidgets 2.8.12. Easy to remove if too ugly.
mScrollRemainder was not getting initialised and so the first time TimeTextCtrl::OnMouse got called, 'steps' got set to a random number (very large and -ve here) and Adjust got called with -2147483648, -1. So we need to initialise mScrollRemainder.
This has been wrong for a while, from what I see. Previous version used Decrease and Increase which were immune to the problem.
'Adjust' decrements steps, whether it is positive or negative to start with. It is designed to have 'steps' strictly positive, so make sure of that.
Make sure OnMouse uses Adjust correctly.
Completes James' TimeConverter work
This completes the work that James started. It moves most of the non-GUI
related processing from TimeTextCtrl to James' TimeConverter class.
Other changes include:
1) TimeTextCtrl now expects the format name instead of the format string to be
passed when creating a new instance. I found that almost all cases created the
instance with a blank format string and then set the string after creation.
2) To simplify maintenance and prevent a possible discrepancy between the two,
Increase() and Decrease() were merged into a single routine.
As a result:
1) All cases where a TimeTextCtrl was being used to extract information and
not actually display a control have been changed to use TimeConverter instead.
2) All cases where TimeTextCtrl was being created with an empty format and
then immediately followed by something like this:
tt.SetFormatString(tt.GetBuiltinFormat(c->GetFormat()))
have been changed to pass the format name instead of the format string when
creating the TimeTextCtrl instance.
The are pretty darn slick. There's an integer one and a floating point
one. They support automatic range limiting (ex., you can't even type a
number outside of the range), proper number formats (ex., you can't
enter a decimal point in an integer field), you can't enter bogus
numbers like "0.3-.2", thousands separators are supported, decimal
precision may be specified and proper number formatting for string
values (or automatic conversion to int, double, float, etc.).
This is part 2...
Improve performance of selection via Selection bar
This provides a similar type of speed up when selecting with the keyboard via
the Selection toolbar.
Saves view type
Defaults to fully expanded upon entry
Live search...may need to adjust the timer
Uses black on white for the icon (should? fix assertion on Linux hopefully)
(will do more a bit later)