...HOWEVER, the auto-repeat of scroll buttons in the Open dialog
do not seem to work, despite the code being identical to what
I just added to New and Slideshow...!?
...when spamming the event queue with motion events over the
value slider, while Tux Paint is busy re-rendering the
rainbow palette at the new Value level.
Also, convert a printf() in the new color picker crosshair sizing
function to DEBUG_PRINTF().
h/t Pere for adding the missing pieces.
WIP b/c there's one minor side effect that needs addressing
(final label, highlighted red, does not lose its highlight)
Onscreen keyboard repositions itself to the top if you use [Enter]
to move the cursor down, and it begins overlapping the keyboard.
Also, play "carriage return" sound effect, even when entering
a blank 'line' of text.
Fixed the issue with the backspace not working in text and label tools
when in certain language modes in macOS. Mac keyboards have the DELETE
key where PC keyboards have the BACKSPACE key, and the two keys have
different keycodes, so the backspace requires special handling on the
macOS in programs writtens for the PC.
* macOS language detection has been updated to be backward compatible to macOS
10.10 Yosemite.
It appears older version(s?) of macOS can just return "en" instead of "en-US"
when queried for the preferred locale. Updated code to account for this.
Avoid leaking memory when loading Label text strings from a saved drawing.
Also, a heck of a lot of comments to explain (as best I understand)
what load_info_about_label_surface() is doing.
It has likely become unneccessary by recent fix for the common part.
Also backported a fix for uppercase issue from sdl2.0 branch (Define Windows native
function for mbstowcs/wcstombs).
When reading label text (on non-Windows, at least), fscanf("%lc")
was being used. It seemed to be skipping the initial space,
causing strings to be shifted left one, and end up with garbage
bytes at the far right.
Fixes https://sourceforge.net/p/tuxpaint/bugs/247/ I hope!
"Apply Label" mode of Label tool can be activated/deactivated,
though it doesn't currently do the work yet.
Also
* Modularized routine to select a Label (via click or [Enter] key):
`select_label_node()`
* Starting routine for applying a Label to the canvas
(via click or [Enter] key): `apply_label_node()`
* Modularized routine for repositioning the on-screen keyboard based on
where we're typing: `reposition_onscreen_keyboard()`
Seems likely that I broke some things.