Commit graph

35 commits

Author SHA1 Message Date
Eberhard Beilharz
4bad36089f
fix(linux): Use temp dir if we can't create cache dir
If we can't create the cache dir, e.g. if `~/.cache` doesn't exist or
if we don't have enough permissions, we now return a temporary directory.

Fixes #10033.
2024-02-09 18:01:40 +01:00
Eberhard Beilharz
91e731a955
Merge pull request #9756 from keymanapp/feat/linux/8598_kmconfig
feat(linux): Allow installing keyboards with arbitrary language 🏘️
2023-10-17 18:02:19 +02:00
Eberhard Beilharz
c56b8a72eb
chore(linux): rename parameters
This addresses code review comments.
2023-10-16 09:12:28 +02:00
Eberhard Beilharz
23cc98a690
feat(linux): Allow installing keyboards with arbitrary language 🏘️
- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
  saving the list

Closes #8598.
2023-10-13 16:57:57 +02:00
Eberhard Beilharz
303e57ba68
refactor(linux): Refactor mocks in ibus-util tests 2023-10-12 18:45:12 +02:00
Eberhard Beilharz
d92808e779
chore(linux): Speed up ibus-util tests 2023-10-12 18:34:50 +02:00
Eberhard Beilharz
152d36a654
fix(linux): Fix installation of keyboards with lang tag mul
We now use the canonical tag without appending the script (unless
necessary).

Fixes #8620.
2023-07-19 12:01:52 +02:00
Eberhard Beilharz
e1dc9574c3
Merge pull request #9215 from keymanapp/chore/linux/newtests
chore(linux): Add unit tests for dconf_util.py
2023-07-13 12:31:26 +02:00
Eberhard Beilharz
8b9f3eb2c5
chore(linux): Add another test 2023-07-11 17:33:46 +02:00
Eberhard Beilharz
847556b176
Merge pull request #9193 from keymanapp/chore/update-data
chore: Update standards data
2023-07-11 08:59:25 +02:00
Eberhard Beilharz
74643d39ed
chore(linux): Add unit tests for dconf_util.py
Tests were generated by ChatGPT (although it didn't get it quite
right - was missing the parameter in `self.settings.reset`).
2023-07-07 18:29:31 +02:00
Eberhard Beilharz
0f8fe48167
fix(linux): Fix Linux build
New langtags.json adds data that a test on Linux uses, so this
change adjust the test.
2023-07-06 19:47:46 +02:00
Eberhard Beilharz
9f5ac8eb4a
fix(linux): Fix uninstalling keyboard for multiple languages with ibus
After this change uninstalling a keyboard will remove all installed
language/keyboard combinations for that particular keyboard.
Previously we only uninstalled for the first language listed in the
keyboard.
2023-07-05 11:57:23 +02:00
Eberhard Beilharz
c6f4541c83
feat(linux): Fix unit tests 2023-05-30 17:51:25 +02:00
Eberhard Beilharz
2fea609714
Merge pull request #8011 from keymanapp/feat/linux/uninstall-if-error
feat(linux): Improve uninstallation
2023-01-25 16:46:56 +01:00
Kevin Schluensen
4c0ede6c4d Change tests to fit install_kmp function 2023-01-20 08:58:14 +01:00
Eberhard Beilharz
efd5200050
chore(linux): More refactoring of uninstall
This change refactors and cleans uninstall:

- rename methods to make it clear which ones are private/protected
- extract common code
- improve error reporting
2023-01-19 18:06:56 +01:00
Eberhard Beilharz
89a253b1ca
feat(linux): Enhance tab completion in km-package-install
This change adds tab completion for the bcp-47 parameter in
km-package-install.

Fixes #5361
2023-01-11 12:28:12 +01:00
Eberhard Beilharz
b1d201a3d7
feat(linux): Replace deprecated distutils
Fixes #6955
2022-08-08 16:38:35 +02:00
Eberhard Beilharz
4c1f6e7be2
fix(linux): Refactor and fix tests
- patch `is_fcitx_running()` so that tests will work without X11
- move common test code to methods
- move some tests to subtests
2022-04-12 12:09:55 +02:00
Eberhard Beilharz
ad2a6b713f
fix(linux): test fileVersion during package install
Fixes #6256
2022-04-11 18:22:46 +02:00
Eberhard Beilharz
c42a623f38
fix(linux): Don't crash when installing keyboards in Wasta
Fixes #6158. This bug got introduced in #6015.
2022-01-27 17:22:02 +01:00
Eberhard Beilharz
2ec64ac521 fix(linux): Fix unit tests 2021-12-09 14:44:33 +01:00
Eberhard Beilharz
a98300f769
fix(linux): Fix failing tests 2021-08-16 11:56:05 +02:00
Eberhard Beilharz
c35e5ff9cc
refactor(linux): Refactor install_kmp.py
- Introduce `InstallKmp` class
- Remove unused `list_files` method
- Extract common method that `install_kmp_shared` and
  `install_kmp_user` use
- Make internal methods protected
2021-05-17 10:58:04 +02:00
Eberhard Beilharz
88e83e191e
fix(linux): Address code review comment
Also add additional test cases from Windows implementation.
2021-02-09 15:51:31 +01:00
Eberhard Beilharz
42f3f36013
fix(linux): improve BCP 47 canonicalization
This is based on #4425. Also a few additional bug fixes that showed
up on the way.
2021-02-08 17:50:05 +01:00
Eberhard Beilharz
693f13a953
fix(linux): Improve fix for #3399
This improves the implementation for normalizing language tags
when installing a keyboard. Based on the Windows implementation
in `Keyman.System.CanonicalLanguageCodeUtils.pas`.

One difference to the Windows implementation is that the mapping of
3- to 2-letter tags is based on `langtags.json` instead of
`iso639-3.tab`.

Closes #3399.
2021-02-03 19:08:03 +01:00
Eberhard Beilharz
9047103028
fix(linux): Lookup language tag from keyboard
When installing a keyboard with a bcp47 tag we now look up the
language tag in the keyboard kmp.json file. This fixes #3399 in
case a script subtag is required for the language and will cause
the keyboard to properly show up in the Linux keyboard selection
list.
2020-07-24 17:54:10 +02:00
Eberhard Beilharz
5ead98dd71
fix(linux): Fix unit tests for beta and stable builds 2020-07-24 08:52:33 +02:00
Eberhard Beilharz
8fbdebc9df
feat(linux): keyman:// protocol handler
This change implements the custom keyman:// protocol handler which
will cause the browser to launch km-config when it encounters a
URL using the keyman protocol.

Related to #3271.
2020-07-23 17:35:26 +02:00
Eberhard Beilharz
78b4187928
fix(linux): Use language from search when installing keyboard
When installing a keyboard install it under the language the user
searched for (if any).

This fixes #3282.
2020-07-20 11:10:05 +02:00
Eberhard Beilharz
071df63ac7
feat(linux): Install keyboard on Gnome
This change adds the keyboard to the Gnome input sources after
installing the .kmx file, and removes it on uninstall.

This implements #2728.
2020-06-24 19:13:40 +02:00
Eberhard Beilharz
fe90bb33eb
chore(linux): Address code review comments 2020-06-17 18:36:13 +02:00
Eberhard Beilharz
16fa9a562f
chore(linux): Add some unit tests for keyman_config 2020-06-17 09:19:19 +02:00