Peter F. Patel-Schneider
3192fa1a34
testing: upgrade desktop notifications tests to take notifications availability into account
2025-01-02 10:47:53 -05:00
MattHag
f5d80c30fa
solaar/ui: Remove outdated logger enabled checks
...
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
2025-01-02 09:26:31 -05:00
MattHag
e9a58fb3e0
Introduce GTK signal types
...
Related #2273
2025-01-02 08:29:32 -05:00
MattHag
ab52c4a7c0
Introduce error types
...
Related #2273
2025-01-02 08:29:32 -05:00
MattHag
72c9dfc50c
Remove NamedInts: Convert NotificationFlag to flag
...
Related #2273
2025-01-01 10:46:04 -05:00
MattHag
571cdb5f2d
Prepare refactoring of NotificationFlag
...
Ensure behavior stays the same.
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
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
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
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
Peter F. Patel-Schneider
2185a8390c
ui: fix initialization bug for PackedRangeControl
2024-10-22 14:31:13 -04:00
MattHag
0cd9c0c9b5
Refactor: Introduce Feature enum
...
Convert Feature NamedInts to SupportedFeature integer enum.
Related #2273
2024-10-14 07:28:09 -04:00
MattHag
194c385824
RuleComponentUI: Type hints methods
2024-10-11 07:42:38 -04:00
MattHag
d1f9b9ca3d
diversion_rules: Add type hints
2024-10-11 07:42:38 -04:00
MattHag
97d1e90ceb
Fix signature of show
...
Fix diverged signature of RuleComponentUI subclasses.
2024-10-11 07:42:38 -04:00
MattHag
9f57955142
Action menu: Move context menu into own class
...
Reduce complexity of diversion dialog.
2024-10-11 07:42:38 -04:00
MattHag
3277015ab6
diversion: Add type hints
2024-10-11 07:42:38 -04:00
MattHag
46366b2430
Fix warnings from automatic code inspections
...
Warnings found by automatic code inspection and partially tackled
- Drop distuitls inf favour of setuptools
- Replace deprecated pyudev.Device.from_device_number
- Remove unnecessary brackets
- Avoid access to private variables etc.
- Shadows built-in name
- Line length >120 characters
- Not a module level variable
- Simplify clause
and more
2024-10-11 07:42:38 -04:00
MattHag
0f4d1aebcd
ui/common: Introduce tests
2024-10-11 07:42:38 -04:00
MattHag
a7ad625023
Fix about dialog
2024-10-11 07:42:38 -04:00
MattHag
a75c4b9679
ui/about: Use Model-View-Presenter pattern for testability
...
Split model and view, and enable view mocks for unit tests without GDK.
2024-10-11 07:42:38 -04:00
Peter F. Patel-Schneider
4aada31b21
ui: augment pairing message for devices with multiple channels
2024-10-08 15:15:35 -04:00
MattHag
128ec43d70
solaar: Add type hints
2024-10-08 14:35:16 -04:00
MattHag
d5af19be8a
Make ui/desktop_notifications testable
...
Introduce unit tests.
Related #2273
2024-10-08 14:35:16 -04:00
MattHag
e8ef262433
Rename ui/notify module to desktop notifications
...
Related #2273
2024-10-08 14:35:16 -04:00
MattHag
67829c5807
Clean up imports ( #2537 )
...
* Remove import as _ in solaar startup
Related #2273
* Remove import as _ in listener
Related #2273
* Remove import as _ in cli init
Related #2273
* Remove import as _ in gtk
Related #2273
* Remove import as _ in show
Related #2273
* Remove import as _ in tray
Related #2273
* Remove import as _ in profiles
Related #2273
* Remove import as _ in config
Related #2273
* Remove import as _ in config panel
Related #2273
* Remove import as _ in window
Related #2273
* Remove import as _ in pair
Related #2273
* Remove import as _ in pair window
Related #2273
* Remove import as _ in cli package
Related #2273
* Remove import as _ in ui package
Related #2273
* Remove commented out code
Related #2273
* Use constant for Logitech ID
2024-07-15 08:37:18 -04:00
Anderson Silva
8ab8cb0225
docs: Update about.py ( #2535 )
...
Update copyright date in about page to reflect current year (2024)
Follow-up to #2074
2024-06-23 17:56:52 -04:00
MattHag
5a63e44d58
Remove empty comment lines
...
Remove hashtags solely used for structuring.
Related #2273
2024-06-02 09:54:21 -04:00
Matthias Hagmann
c9dc232951
Refactor: Use dataclasses and enums
...
Replace unnecessary NamedInts in favour of default data types.
Simplify interfaces by reducing possible input from strings to members
of an enum.
2024-05-22 21:14:41 -04:00
Matthias Hagmann
7d171b1d09
Refactor: Use dataclasses and enums
...
Replace NamedTuples with more flexible dataclass, which also support
type hints. Introduce enums to replace constant strings, which need to
be kept in sync. Also enhances interfaces by limiting it to the enum
values. Remove unused variables.
2024-05-22 21:14:41 -04:00
Peter F. Patel-Schneider
b4811f602d
ui: fix bug with logo in about window
2024-05-04 04:46:27 -04:00
MattHag
959dd2a35b
Refactor rule loading for testability ( #2456 )
...
rules: Introduce tests for YAML rule loading functionality.
2024-04-27 17:56:27 -04:00
Peter F. Patel-Schneider
bd437b548b
ui: refactor pair_window
2024-03-25 09:13:22 -04:00
Peter F. Patel-Schneider
97d214f667
ui: handle situation when read of a setting fails
2024-03-24 15:44:15 -04:00
Matthias Hagmann
4e6361429e
refactor: Use f-strings for more exceptions and log message
...
Semi manually convert remaining strings with no translation to f-string.
2024-03-24 07:01:56 -04:00
Peter F. Patel-Schneider
50c8013cb1
ui: reduce deprecation warnings in ui
2024-03-19 09:07:21 -04:00
Matthias Hagmann
c6adf94e5d
refactor: Use dataclass for TestByte
...
Related #2378
2024-03-14 17:15:10 -04:00
Matthias Hagmann
2f6e3e21ec
refactor: Split diversion rules into smaller modules
...
Put rule conditions and actions into their into module
Related #2378
2024-03-14 17:15:10 -04:00
Matthias Hagmann
4e7356385d
refactor: Make _populate_model a function
...
Related #2378
2024-03-14 17:15:10 -04:00
Peter F. Patel-Schneider
154dd7017f
rules: allow sub-second delays in Later
2024-03-14 17:08:47 -04:00
Ferdina Kusumah
a02b1065ac
Add indonesian translations
2024-03-14 12:44:36 -04:00
Matthias Hagmann
5b09ace1f5
ruff: Apply single line import format
...
# Usage
pre-commit run --all-files
Related #2295
2024-03-13 15:41:21 -04:00
Matthias Hagmann
e92f1a8a0b
Automatically upgrade strings to f-string
...
Used flynt to convert strings to f-strings, where safely possible.
Usage:
flynt .
Related #2372
2024-03-13 11:02:50 -04:00
MattHag
704d591448
ui: refactor diversion_rules
...
* refactor: Create close dialog in its own function
Related #2378
* refactor: Create selected rule edit panel in module level function
Related #2378
* refactor: Remove commented code
Related #2378
* refactor: Use Gdk constant for right click button comparison
Related #2378
* refactor: Make _menu_do_copy a function
Related #2378
2024-03-11 10:19:20 -04:00
Peter F. Patel-Schneider
569f829a63
ui: fix bug in determining tray icon
2024-03-11 08:23:27 -04:00
Peter F. Patel-Schneider
9c5ba6445e
device: remove status from Device and Receiver
2024-03-11 08:23:27 -04:00