Commit Graph

2810 Commits

Author SHA1 Message Date
MattHag 5ca9c0a6ba Remove NamedInts: Convert Spec to enum
Related #2273
2025-01-01 10:46:04 -05:00
MattHag f54eeb7998 Remove NamedInts: Convert KeyFlag to Flag
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 0bf7a78553 Add type hints
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 267b0a723d key flags: Move to module of use
The key flags are solely used in hiddpp20 module, thus put them into the
module.

Related #2273
2025-01-01 10:46:04 -05:00
MattHag 5a9725ee17 Add type hints
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 4c160d1723 Remove NamedInts: Convert Task to enum
Refactor code related to task and task ID.

Related #2273
2025-01-01 10:46:04 -05:00
MattHag b74e789715 Remove NamedInts: Convert Column to enum
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 0d7fc46a81 settings: Add docstrings and type hint
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 8bc42d20fb Enforce rules on RuleComponentUI subclasses
Enforce create_widgets and collect_values.

Related #2273
2025-01-01 10:46:04 -05:00
MattHag dd13993ff3 Simplify settings UI class
Classes shouldn't don't need to know about other settings classes.

Related #2273
2025-01-01 10:46:04 -05:00
MattHag cdaffce463 Refactor: Remove diversion alias
Related #2273
2025-01-01 10:46:04 -05:00
MattHag dfb4ccc93f type hints: Introduce settings protocol
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 3636ed78bb Refactor: Convert Kind to IntEnum
Related #2273
2025-01-01 10:46:04 -05:00
MattHag 03de6fb276 Split up huge settings module
- Move validators into their own module.
- Convert Kind to IntEnum

Related #2273
2025-01-01 10:46:04 -05:00
Peter F. Patel-Schneider 789d35450c solaar: don't close temp file until after CLI call 2025-01-01 10:40:07 -05:00
MattHag 62e8aacd9f Remove Python 2 specific path handling
Related #2273
2025-01-01 10:18:44 -05:00
Nick 8eb0aec3e8 i18n: Swedish translations in .desktop files 2025-01-01 10:15:42 -05:00
MattHag 8a0fc13f23 Test arg parse 2025-01-01 10:14:10 -05:00
MattHag 41768d9616 Test receiver notification info 2025-01-01 10:14:10 -05:00
Nick a822b2f237 Update Swedish translation 2025-01-01 10:06:53 -05:00
Jan Fader dfafe15575 delete temp-file in case help-actions too 2025-01-01 10:04:44 -05:00
Jan Fader e6c833f635 delete tmpfile on close for cli 2025-01-01 10:04:44 -05:00
Peter F. Patel-Schneider 7e9babdc79 release 1.1.14 2025-01-01 09:42:39 -05:00
Nick 01d76bb0ed i18n: Swedish translations in .desktop files 2025-01-01 09:37:14 -05:00
Peter F. Patel-Schneider 3768354230 release 1.1.14rc4 2024-12-24 10:36:55 -05:00
Peter F. Patel-Schneider 87afc3659e cli: handle fake feature enums in show 2024-12-24 10:29:55 -05:00
Matthaiks 2e9aa64a2e Update Polish translation 2024-12-24 10:28:17 -05:00
Peter F. Patel-Schneider e945f797a2 release 1.1.14rc3 2024-12-23 10:57:24 -05:00
MattHag 73c88210f7 Fix battery entry in device
Enforce use of enum value.

Fixes #2700
Related #2273
2024-12-23 10:50:43 -05:00
Peter F. Patel-Schneider 510753ea67 release 1.1.14rc2 2024-12-23 10:40:49 -05:00
Peter F. Patel-Schneider c2a3bc7e55 release 1.1.14rc1 2024-12-23 10:40:49 -05:00
Nick b6f5f86c36 i18n: Swedish translations in .desktop files 2024-12-09 08:49:20 -05:00
Nick ba4fda00df Update Swedish translation 2024-12-09 06:39:04 -05:00
Nick 1fcedeee70 i18n: Swedish translations in .desktop files 2024-12-09 06:37:28 -05:00
Nick 2157fdb59c
po: Add translator to list (#2687)
* Add translator to list

* Update i18n.md

---------

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2024-11-29 16:42:07 -05:00
Osman Karagöz c5f74953ce
po: Update tr.po (#2683) 2024-11-17 08:48:14 -05:00
Max Ammann ff6f7a8e22
settings: Add ratchet setting for smart shift enhanced devices (#2681)
* Add ratchet setting for smart shift enhanced devices

* Update lib/logitech_receiver/settings_templates.py

---------

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2024-11-16 16:06:02 -05:00
Pierre Carru 8b0904ead0
receiver: fix BoltReceiver, Ex100Receiver __init__ (#2661) 2024-11-10 17:44:40 -05:00
Nick 9d5568f6e5
po: Update Swedish translation (#2671)
* Update Swedish translation

Small fixes

* Update sv.po

* Update sv.po

* Update sv.po
2024-11-09 12:17:06 -05:00
Nick ba4bbd0118
po: Update Swedish translation (#2670) 2024-11-08 15:48:35 -05:00
MattHag 862cef1f77 hidpp20_constants: Refactor Gesture into enum
Replace Gesture NamedInts with enum.

Related #2273
2024-11-03 14:41:07 -05:00
Romain Loutrel a19461b29d
refactor: replace ERROR NamedInts by IntEnum (#2645)
* refactoring(logitech_receiver/notifications): change to enums PairingError and BoltPairingError

* refactoring(logitech_receiver/notifications): change to enums PairingError and BoltPairingError (Fix pre-commit checks)

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum

* refactor(logitech_receiver/base.py): create unit tests for request function before replacing ERROR NamedInts by IntEnum

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum (add exclusion for macOS)

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum (fix for python < 3.10)

* refactor(solaar/cli./probe.py): create unit tests for run function before replacing ERROR NamedInts by IntEnum (focusing on the call order when receiving errors)

* refactor(solaar/cli./probe.py): refactor register processing to handle short and long registers in a single loop structure for improved readability and reduced code duplication.

* refactor(logitech_receiver/hidpp10_constants.py): replace ERROR NamedInt by IntEnum.

* refactor(logitech_receiver/hidpp10_constants.py): distinguish hidpp10 and hidpp20 errors in the code for readibility.

* refactor(logitech_receiver/hidpp20_constants.py): replace ERROR NamedInt by IntEnum.

* refactor(logitech_receiver/hidpp20_constants.py): replace ERROR NamedInt by IntEnum. (fix problem with | operator when typing with python 3.8)

* feature(hide on startup option): Visual test (not binded yet) DRAFT

* refactor(solaar/cli./probe.py): create unit tests for run function before replacing ERROR NamedInts by IntEnum (focusing on the call order when receiving errors)

* refactor(solaar/cli./probe.py): refactor register processing to handle short and long registers in a single loop structure for improved readability and reduced code duplication.

* refactor(logitech_receiver/hidpp10_constants.py): replace ERROR NamedInt by IntEnum.

* refactor(logitech_receiver/hidpp20_constants.py): replace ERROR NamedInt by IntEnum.

* refactor(logitech_receiver/hidpp20_constants.py): replace ERROR NamedInt by IntEnum. (fix problem with | operator when typing with python 3.8)

* feature(hide on startup option): Visual test (not binded yet) DRAFT

* Merge: Refactor: hidpp20 to use enum

* Merge: Refactor: hidpp20 to use enum (fix test)

---------

Co-authored-by: some_developer <some.developper.44@gmail.com>
2024-11-02 10:17:50 -04:00
MattHag c90146df31
Refactor: hidpp20 to use enum (#2647)
* Remove duplicated Param definition

Use constants from hidpp20 constants

Related #2273

* hidpp20/Param: Refactor to use IntEnum

Related #2273

* hidpp20_constants: Refactor to use IntEnum

Related #2273
2024-11-02 08:33:58 -04:00
John Erling Blad 8518604155
i18n: Updated Norwegian Nynorsk (nn) (#2655)
Co-authored-by: John Erling Blad <jeblad@google.com>
2024-10-31 05:27:09 -04:00
John Erling Blad de033267fa i18n: Updated Norwegian Bokmål (nb) 2024-10-31 04:19:57 -04:00
John erling Blad 0d4fd4c537 i18n: Updated Norwegian Bokmål (nb) 2024-10-28 08:11:53 -04:00
MattHag 1afcfe4b57
refactor: use IntEnum for firmware and cidgroup constances
* Refactor: test_named_ints_flag_names

Shorten test and clarify behavior using binary numbers.

* Introduce plain flag_names function

This replicates the NamedInts functionality as plain function.

* Refactor FeatureFlag to use IntFlag

Replace NamedInts implementation with IntFlag enum and plain flag_names
function.

Related #2273

* Refactor FirmwareKind to use IntEnum

- Move general FirmwareKind to common module.
- Replace NamedInts implementation with IntEnum.
- Harden related HIDPP 1.0 get_firmware test.

Related #2273

* Refactor CID_GROUP, CID_GROUP_BIT to use IntEnum

Related #2273
2024-10-23 16:25:35 -04:00
Romain Loutrel 79ffbda903
change pairing error values to intenums
* refactoring(logitech_receiver/notifications): change to enums PairingError and BoltPairingError

* refactoring(logitech_receiver/notifications): change to enums PairingError and BoltPairingError (Fix pre-commit checks)

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum

* refactor(logitech_receiver/base.py): create unit tests for request function before replacing ERROR NamedInts by IntEnum

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum (add exclusion for macOS)

* refactor(logitech_receiver/base.py): create unit tests for ping function before replacing ERRORNamedInts by IntEnum (fix for python < 3.10)
2024-10-23 16:22:22 -04:00
Peter F. Patel-Schneider 2185a8390c ui: fix initialization bug for PackedRangeControl 2024-10-22 14:31:13 -04:00
rloutrel 0d12c6f229 notifications: Introduce unit tests 2024-10-20 12:57:00 -04:00