... Moved many misplaced ones, which msgfmt would not have extracted into
audacity.pot.
Duplicated some of them, to appear with related but distinct msgids.
Added a few new comments.
Deleted one that was no longer needed in ProjectManager.cpp.
... 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.
... except Audacity.h
This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
... except Audacity.h; and in no others.
Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.
This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.
Also move inclusions of Experimental.h earlier.
Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
... 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)
... instead use the utility make_iterator_range and its index() or contains()
method. This generic utility works with any container defining begin() and
end().
This further lessens dependency on wxWidgets container idioms.
... 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
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.
In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
The commented out wxLogDebug statements in Theme.cpp give the
location of all the boxes in the theme. This is useful
for identifying what is in the theme cache for javascript code.
This #ifdeffed out TEST_CARD is useful for javascript code that shows how a
theme will look, when applied to Audacity. With the code enabled, each
pixel of audacity is painted with a colour that encodes the location in
the theme image map that was used.
Net result - in javascript you can change any colour in the theme cache
and instantly see how Audacity will look.
... Problem was introduced in 2.2.0 at commit dc05b94
Also, in MixerBoard, change name whenever changing the label, which might
matter to screen readers.
... 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.
- 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.
Problem was that on mac enable/disable clears the colour back to black.
The easiest workaround was to create a new class auStaticText that does all that we
need for wxStaticText.
Fix off by one error in size.
Git-bisect indicated a problem (on Mac only) caused by a change in an image file.
It's possible that this is an error in code that we have 'got away with' until now.
We always have an extra zero on the end of the image data and included it in the count of the
size of stream to unpack. For a particular image this may have triggered a memory corruption
problem.
- Highlighting of Buttons in TCP and Sliders
- No crinkly Help Icon anymore
- Invisible numbers in NoteTrack fixed
- Better visibility of label track dragger elements
- Theme rearranged more logically, and dead images culled
I found a couple of problems working with upscaled image caches.
Firstly in GIMP a 'size 4 square pencil' is not 4x4, which makes editing an upscaled image very fiddly.
Secondly the wxIMAGE_QUALITY_NEAREST algorithm is not as dumb as I need it to be, and it is doing some blending when rescaling. This leads to loss of image quality in some cases.
So when we do switch to Hi-DPI support, we need to be 'all in' and only be downscaling in Audacity, not upscaling too.
Adding an orange border around the images in a theme makes it much easier to cut and paste in the correct position. I've also expanded the internal images and fixed up a few image details - the pins/bobbins on darker themes, and the light blue rather than dark blue for negative times.
The image cache that users work with should now have 'pixels' that are 4x4. This will in time allow us to have large or small versions of all buttons, and also means we have hi resolution images for HiDPI screens. The actual cost of the extra size should be small, as compression will see lots of repetition.
The main point of doing this now is so that new contributed themes can be HiDPI from the start.