Commit graph

2095 commits

Author SHA1 Message Date
Marc Durdin
13d266f0ea
Merge pull request #5097 from keymanapp/fix/developer/cherry-pick/5095-editor-settext-not-synchronous
fix(developer): TframeTextEditor.SetText was not synchronous 🍒
2021-05-21 08:31:44 +10:00
Darcy Wong
f9db2e5efe chore(common): Check in crowdin strings for Amharic 2021-05-20 05:47:59 +07:00
Marc Durdin
52dcd313bf fix(developer): TframeTextEditor.SetText was not synchronous
Fixes #5095.

If the text editor was loaded, `SetText` would not be synchronous
because it executed some Javascript to make the text change, so setting
the text and immediately reading it again would give the old text. This
is what the On Screen Keyboard editor was doing (it would synchronize
the visual editor and text editor at save). This fix updates `SetText`
to update the backing store as well as the front end editor.
2021-05-18 06:33:33 +10:00
Marc Durdin
4739b92daf fix(developer): kmconvert commandline and deploy
A few fixes and improvements:
* kmconvert was missing a command line parameter for `-target` to
  specify the platform targets for a project
* kmconvert should avoid throwing unhandled exceptions, rather if
  sentry is not present then just write to console.
* Include kmconvert and its data files in the deployment of kmcomp.zip,
  which is done on the build agent (just need to make sure files are
  in the right place here.)
* Side fix: also made sure kmcomp would emit the exception message to
  console if sentry is not present.
2021-05-14 11:00:20 +10:00
Darcy Wong
54115c8735
Merge pull request #5039 from keymanapp/cherrypick/common/4992-crowdin-az
chore(common): Check in crowdin files for Azerbaijani 🍒
2021-05-11 06:05:35 +07:00
Marc Durdin
518736159e
Merge pull request #5038 from keymanapp/fix/windows/cherry-pick/4965-alternative-tips-block-activation
fix(windows): avoid disabling Keyman when speech recognition starts 🍒
2021-05-10 19:35:55 +10:00
Darcy Wong
75220054d9 chore(common): Check in crowdin files for Azerbaijani 2021-05-07 13:49:11 +07:00
Marc Durdin
144efd9214 fix(windows): avoid disabling Keyman when speech recognition starts
Fixes #4965.

When speech recognition is enabled, it sometimes activates after a
Keyman keyboard is selected. This would cause Keyman to think it is
being deactivated. We needed to check in
`CKMTipTextService::OnActivated` that it was a keyboard-type TIP that
was being activated, and only deactivate the Keyman hooks in that
situation.

This commit also adds a little logging helper function, and removes an
unused variable `guidActiveProfile`.
2021-05-07 15:34:11 +10:00
Marc Durdin
d6fe4d9eed chore(windows): add telemetry to trace crash on exit
Relates to #4700.

This simply adds some debug logging so that when the current crash
occurs, we can discover which windows have failed to automatically
close, which should give us enough detail to be able to reproduce the
problem, hopefully, and fix it.
2021-05-02 14:47:15 +10:00
Marc Durdin
3bb62d7f3e fix(windows): avoid error if keyman32.dll renamed
Fixes #4939.
Fixes KEYMAN-WINDOWS-70.
Fixes KEYMAN-WINDOWS-71.
Fixes KEYMAN-WINDOWS-BR.
Fixes KEYMAN-WINDOWS-6J.

I am speculating a little here, because the root cause is not visible in
the crash report, but it appears that if keyman32.dll is renamed, that
the UnregisterControllerWindows function attempts to reload keyman32.dll
which means that (a) it no longer has a list of registered controllers,
and (b) it may fail to reload.

Instead of throwing an exception, we now only log this error in
development mode. The error is not likely to cause significant trouble
for end users as they are shutting down Keyman anyway at this point.

The resolution if there is any uncertainty during an upgrade is to
restart Windows. This is less than ideal but avoids file locks and
problems with in-memory DLLs. (Future versions of Keyman will schedule
upgrades to happen automatically after a restart before Keyman has been
started, in an effort to avoid this kind of trauma.)
2021-04-21 14:25:37 +10:00
Marc Durdin
cd1d931c06
Merge pull request #4900 from keymanapp/chore/windows/cherry/4893-disable-profile-repair
chore(windows): disable profile repair 🍒
2021-04-21 13:50:23 +10:00
Marc Durdin
5bbee38e0c
Merge pull request #4935 from keymanapp/fix/developer/cherry-pick/4803-chiral-warning-is-disruptive
fix(developer): chiral mismatch warning is disruptive 🍒
2021-04-21 11:27:16 +10:00
Marc Durdin
9bb3813664
Merge pull request #4919 from keymanapp/fix/developer/cherry/4917-crash-on-malformed-kpj-user-file
fix(developer): avoid crash if .kpj.user file is malformed 🍒
2021-04-21 10:24:55 +10:00
Marc Durdin
f945ac321e
Merge pull request #4923 from keymanapp/fix/windows/cherry-pick/4874-help-contents-broken-from-tray-menu
fix(windows): help contents broken from tray menu 🍒
2021-04-21 10:22:07 +10:00
Marc Durdin
87cbff4e4c
Merge pull request #4921 from keymanapp/fix/windows/cherry-pick/4848-access-violation-closing-text-editor
fix(windows): access violation closing text editor 🍒
2021-04-21 10:21:54 +10:00
Marc Durdin
2df14077de
Merge pull request #4901 from keymanapp/fix/windows/cherry/4889-crash-when-installing-tip
fix(windows): crash when installing TIP in some rare situations 🍒
2021-04-21 10:21:41 +10:00
Marc Durdin
f7452aad50
Merge pull request #4888 from keymanapp/fix/windows/cherry/4886-install-crashes-on-invalid-and-legacy-package-names
fix(windows): handle invalid package names during install 🍒
2021-04-21 10:21:16 +10:00
Marc Durdin
97cdc708fa fix(developer): chiral mismatch warning is disruptive
Fixes #4803.

This fixes part of #4803 - namely the obtrusive warning flagging that
there are mismatched modifier types in the keyboard. Instead of making
the change during tab switching, it simply shows a warning message in
the design view of the keyboard, which the developer can choose to
ignore.

This does not address the removal of comments or the switch of character
formats which is part of that conversion routine. That is a more complex
change to the parser.
2021-04-21 10:12:27 +10:00
Marc Durdin
325bbc28c2 Update initprog.pas 2021-04-21 06:23:43 +10:00
Marc Durdin
c76539b020 fix(windows): help contents broken from tray menu
Fixes #4874.

Opening product help from the tray menu would end up at a broken page.

Given the title of the link is "Help Contents", I have opted to open at
the help contents... (rather than the alternative of context/tray-menu).
2021-04-20 12:55:53 +10:00
Marc Durdin
c0e4b08176 fix(windows): access violation closing text editor
Fixes #4848.

This error arose because the form was destroyed after kmshell.dpr
completes, which meant that sentry had already been destroyed. The
sentry call was simply to record a breadcrumb of the form being closed.

The fix is to move the lifecycle of the form into the `OpenTextEditor`
function. `OpenTextEditor` is used only by `initprog.RunKMCOM` and so it
is safe to remove the ApplicationRunning path of the code, which
simplifies the lifecycle of the form.
2021-04-20 12:45:43 +10:00
Marc Durdin
63c25cf93f fix(developer): avoid crash if .kpj.user file is malformed
Fixes #4917.

This updates `TProjectLoader` to use the same exception handling pattern
for loading the .kpj.user file as we use for the .kpj file.
2021-04-20 10:52:59 +10:00
Darcy Wong
8bcb2656cf
Merge pull request #4904 from keymanapp/cherrypick/common/4829-crowdin-indonesian
chore(android,windows): Check in crowdin for Indonesian 🍒
2021-04-19 15:23:58 +07:00
Darcy Wong
f31115cb79
Merge pull request #4903 from keymanapp/cherrypick/common/4895-update-crowdin-fr
chore(common): Update crowdin for French 🍒
2021-04-19 15:23:37 +07:00
Darcy Wong
cecf7ab9ab chore(android,windows): Check in crowdin for Indonesian 2021-04-19 15:11:44 +07:00
Darcy Wong
19760f99fe chore(common): Update crowdin for French 2021-04-19 13:57:47 +07:00
Marc Durdin
b14e2f5d7e fix(windows): crash when installing TIP in some rare situations
May fix #4889.

In some situations, Keyman is unable to precisely match the user's
default language with its own keyboard settings. In this situation,
Keyman may crash when attempting to install the TIP, or may give a
spurious error such as "Too many transient languages" or similar.

I have been unable to reproduce the crash described in #4889 on my
machines so this is an attempted fix.

This does fix a bug with default languages in any case so is a good fix
to include: if the user's default language is not found in Keyman's LCID
table, then Keyman would fail to install the TIP when the keyboard is
installed and would return an error message (but not crash).
2021-04-19 15:59:59 +10:00
Marc Durdin
2a3c43f328 chore(windows): disable profile repair
Fixes #4893.
Fixes KEYMAN-WINDOWS-50.
Fixes KEYMAN-WINDOWS-4Z.

Profile repair was using legacy code for re-establishing Keyman TIP
profiles after they had been modified by a third party app or Windows.
However, with Keyman 14's new profile registration pattern, this is both
less likely to occur and also easier to resolve (just disabling and
re-enabling the keyboard should do it).

Thus, I have opted to disable the profile repair code as, with the way
it stands at present, it may well make things worse, even aside from the
crash, because of disparities between user and admin TSF settings.
2021-04-19 15:55:07 +10:00
Darcy Wong
4d5fef69f7 fix(developer): Reduce non-canonical BCP 47 tag warning in PackageInfo to "Info" 2021-04-19 07:53:22 +07:00
Marc Durdin
7cac8a70a7 fix(windows): handle invalid package names during install
Fixes #4886.

This patch includes 5 separate fixes for the various scenarios we
encountered during package installation.

1. RunTools.pas: don't attempt to install TIPs if package is not also
   being installed.

2. Keyman.Setup.System.OnlineResourceCheck.pas, OnlineUpdateCheck.pas:
   handle online update check for packages with spaces or periods in the
   id (legacy packages only).

3. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `(n)` and `[n]` patterns as well as the current
   ` (n)` pattern.

4. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `_n` pattern. See code comments for details.

5. Keyman.Configuration.System.TIPMaintenance.pas: Avoid crashing if
   `kmshell -install-tips-for-packages` is passed an invalid package
   name.

The crash is actually fixed in point 5 above, but the root causes are
addressed in the other points.
2021-04-19 08:31:49 +10:00
Darcy Wong
1011de5c8b
Merge pull request #4822 from keymanapp/chore/windows/crowdin-ff
chore(common): Check in crowdin strings for Fulah
2021-04-01 08:50:35 +07:00
Marc Durdin
08235c869e
Merge pull request #4832 from keymanapp/fix/developer/4830-range-expansions-buffer-size-cherry
fix(developer): buffer size for range expansions 🍒
2021-04-01 12:49:54 +11:00
Marc Durdin
08dcbcd2cc
Merge pull request #4815 from keymanapp/fix/developer/4810-requote-font-names-cherry
fix(developer): requote font names 🍒
2021-04-01 10:12:16 +11:00
Marc Durdin
14198c7a81 fix(developer): buffer size for range expansions
Fixes #4830.

There remain some additional buffer size checks we should be doing in
`GetXString` but this will address the current issue by using the
standard maximum buffer size.
2021-03-31 19:12:33 +11:00
Darcy Wong
a5a0a619a4 chore(windows): Fix parameter number 2021-03-30 13:45:48 +07:00
Darcy Wong
b265322e8c chore(windows): Check in crowdin strings for Fulah 2021-03-30 10:08:17 +07:00
Marc Durdin
573273a86a fix(developer): requote font names
Fixes #4810.
2021-03-29 20:53:56 +11:00
Marc Durdin
d6c69676e7 fix(developer): open containing folder was not opening correct folder
Fixes #4773.
2021-03-25 06:45:04 +11:00
Marc Durdin
2563189bfa fix(windows): Change TLangSwitchRefreshWatcher ownership
Fixes #4751.
Fixes KEYMAN-WINDOWS-76.
Fixes KEYMAN-WINDOWS-79.
Fixes KEYMAN-WINDOWS-7B.
Fixes KEYMAN-WINDOWS-7E.
Fixes KEYMAN-WINDOWS-7F.
Fixes KEYMAN-WINDOWS-7K.
Fixes KEYMAN-WINDOWS-7N.
Fixes KEYMAN-WINDOWS-80.

This resolves an issue where the TLangSwitchRefreshWatcher thread would
terminate early on Win7 (as it had no work to do), and free itself, but
then the main form would reference it post-free. Responsibility for free
has been moved to the main form.

This would result in various exceptions as state is corrupted at this
point.
2021-03-23 08:57:24 +11:00
Marc Durdin
bec6be0329
Merge pull request #4726 from keymanapp/fix/windows/4724-avoid-double-start-during-setup
fix(windows): Avoid double start during setup
2021-03-19 20:57:58 +11:00
Marc Durdin
4e518f660d fix(windows): backup start with windows value during setup
The value is not restored for upgrades unless we back it up, because
Setup does not change these settings if they are not present :)
2021-03-19 14:40:16 +11:00
Marc Durdin
1f3d71611f fix(windows): ensure profiles are reinstalled during setup
Fixes #4725.
2021-03-19 14:26:36 +11:00
Marc Durdin
b97fc4c82c fix(windows): Avoid double start during setup
Fixes #4724.
2021-03-19 14:24:55 +11:00
Marc Durdin
7b032aff26
Merge pull request #4717 from keymanapp/chore/windows/finalize-help
chore(windows): finalize help
2021-03-18 18:50:50 +11:00
Marc Durdin
7c67ffd93c chore(windows): finalize help 2021-03-18 16:39:24 +11:00
Marc Durdin
96939521b1 fix(windows): Download keyboard dialog TLS protocol support
Fixes #4709.
2021-03-18 14:24:44 +11:00
Marc Durdin
5eb0aec0e8
Merge pull request #4691 from keymanapp/fix/developer/named-code-constants-end-of-line-test
fix(developer): support named character codes at end of line
2021-03-16 23:26:03 +11:00
Marc Durdin
9ae541940a
Merge pull request #4699 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
chore(developer): upgrade bcp 47 canonicalisation to warning
2021-03-16 23:25:28 +11:00
Marc Durdin
de74fddbc2 chore(developer): upgrade bcp 47 canonicalisation to warning
This does not trigger a build failure; validation warnings currently always pass.
Info messages are currently suppressed with -s which also suppresses the banner,
which is more plumbing than we should change just now.
2021-03-16 20:07:27 +11:00
Marc Durdin
aa8538a8d9
Merge pull request #4689 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
fix(developer): validate keyboard_info should give info on non-canonical bcp47
2021-03-16 19:32:36 +11:00