Fixes#8157.
There are some limitations in this dialog as it stands; we will rework
it completely when we revisit BCP 47 tagging.
However, for now, this addresses some strange behaviours around the
Reset button and the displayed output:
* The Reset button will only be enabled if you change the text in the
Language Name field.
* The messaging around a missing language subtag is clearer -- tells
the user that they need to enter something there.
* The Reset button will now never insert default text strings into the
Language Name field.
One example of something that is slightly weird, is if you enter a
two-letter region subtag into the script box, it will show what looks
like a valid tag in the output box (e.g. `en-Au`), but it will be
considered invalid, because that two letter subtag needs to be entered
into the region box.
Fixes#7879.
If we enter a search string that results in zero results, the grid
resize to one row attempts to select row zero. However, we prevent this.
This leaves the current row outside the range of valid rows, which means
the grid is in an invalid state.
This later causes a crash if the user attempts to mousewheel up. There
may be other similar crashes in this situation, but I haven't found any
yet.
Fix is to allow selection of row zero when there is only one row. I have
not found any problems caused by allowing this.
Fixes#7810.
This addresses a regression introduced in #7631, where URL parameters
with spaces would be encoded into `+` instead of `%20`. Looking a bit
deeper at the Delphi `TNetEncoding.URL.Encode` function I realised that
it was entirely inadequate. Some guy named Marc Durdin wrote a blog a
good few years ago about the problem, and that's what I ended up using.
This encoding issue caused filenames with spaces (by default, project
paths in Developer have spaces) to give a 404 when editing a touch
layout, which meant that the touch keyboards could not be saved.
Also fixes KEYMAN-DEVELOPER-74, where the + encoding caused multiple
entries to appear in the filename cache.
Amusing to Google this problem, find solid answer on SO, which pointed
to my very own blog. Embarrassing that my own code didn't already
include my own fix.
A secondary issue is also fixed here, where request parameters were
double-decoded for formencoded POST requests. The fix for broken URL
encodings was only required for GET requests.
This also showed up in KEYMAN-DEVELOPER-74, with double-encoded paths
being registered as source files.
Relates to KEYMAN-WINDOWS-B.
While this doesn't address the root cause of the exception, it should
prevent this unhandled exception, and adds breadcrumbs to help us see
which code path might be triggering the issue.
Fixes#7656.
If Keyman Developer is installed, but not Keyman for Windows, then
tsysinfo.exe is not present. If a crash occurs, this causes a secondary
crash when trying to display the error handler dialog. In this
situation, we now just show a dialog box with a short message rather
than the more friendly dialog available via tsysinfo.exe.
We could consider adding tsysinfo.exe into Keyman Developer for a future
release.
It appears that components within a docking form are unable to be
focused in some, rare contexts. We don't want to crash, and the end
result of not focusing is not really all that tragic, so let's just
mask the exception.
The doModifierPress function was testing against the 'actual' device
rather than the virtual device, which meant that in the web debugger on
a desktop, testing a touch device, it was effectively testing against
the desktop device data rather than the simulated touch device data.
I did not observe any significant differences in behaviour between the
two modes. So I am not 100% confident that this change is necessary. But
it is a little concerning that there was a mismatch here.
When using the touch 'system' keyboard, the modifier keys are reset by
the kbdMismatch logic introduced in #7543. This is evident in the web
debugger of Keyman Developer, where the system keyboard is easily
accessible.
This maintains the fix from #7543, but removes the `resetContext()`
side-effect.
Fixes#7628.
Indy components do not treat URLs as UTF-8. Our legacy EncodeURL
function (sourced from Indy components) was the same. Discovered we
needed to fixup the parsing of URLs as well as the construction of them;
there may be other places we need to fix, although I did do a search for
the relevant types in TIKE source.
Fixes#7616.
Fixes a crash when attempting to infer key cap text from key id, and
cleans up the support for inferred key text so that it works correctly
in the designer.
Also adds a safeguard to KMW to stop invalid key ids causing a crash.