Commit Graph

91 Commits

Author SHA1 Message Date
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 2185a8390c ui: fix initialization bug for PackedRangeControl 2024-10-22 14:31:13 -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 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
MattHag 5a63e44d58 Remove empty comment lines
Remove hashtags solely used for structuring.

Related #2273
2024-06-02 09:54:21 -04:00
Peter F. Patel-Schneider 97d214f667 ui: handle situation when read of a setting fails 2024-03-24 15:44:15 -04:00
Peter F. Patel-Schneider 50c8013cb1 ui: reduce deprecation warnings in ui 2024-03-19 09:07:21 -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 7ef3059b69 clean up: Remove editor specific marks
Related #2273
2024-02-29 10:10:46 -05:00
Matthias Hagmann eb937fcc3a Manually fix linter issues
Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Peter F. Patel-Schneider d1c899d6da solaar: improve imports and guard Gtk, etc imports with correct version
solaar: move imports to top of files

solaar: move more imports to top of files

solaar: guard Gtk, etc imports with correct version
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider 17e6463950 ui: improve imports in ui
ui: move imports in about.py to top of file

ui: move imports to top of notify.py

ui: move imports to top of window.py

ui: reorder imports at beginning of __init__.py

ui: move imports to top of tray.py

ui: move common code out of __init__.py to common.py

ui: move imports to top of __init___.py
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider fb5b7e0582 ui: better checking for setting in record_setting 2024-02-13 04:01:19 -05:00
Peter F. Patel-Schneider e6aacc42dd ui: tidy up scrolling appearance in configuration panel 2024-02-11 16:50:31 -05:00
Peter F. Patel-Schneider 663490ea4b ui: don't unlock setting when changed by external means 2024-02-10 14:45:00 -05:00
Peter F. Patel-Schneider 468fad1358 ui: refactor code to record change to setting 2024-02-10 14:45:00 -05:00
MattHag 87658fb189
logging: Simplify logger instantiation
* logging: Simplify logger instantiation

Relates #2254

* logging: Remove aliases

Relates #2254

* logging: Replace deprecated warn with warning

Related #2254

* logging: Fix mistake

Related #2257
2024-02-10 13:55:27 -05:00
Peter F. Patel-Schneider 8811374ed9 ui: don't lock setting when an error occurs 2024-02-10 09:15:27 -05:00
Peter F. Patel-Schneider 23517048d4 device: clean up data for LED effects 2024-02-09 08:36:36 -05:00
Peter F. Patel-Schneider 7c441cc652 ui: better startup behavior for LED effect settings 2024-02-09 08:36:36 -05:00
Peter F. Patel-Schneider 73d091c86f ui: add UI for LED Zone control 2024-02-09 08:36:36 -05:00
Peter F. Patel-Schneider 9c4bbec5e2 ui: handle backlight notification 2024-02-06 12:49:08 -05:00
Peter F. Patel-Schneider 99f9c8762e settings: only record changes of scroll wheel ratchet 2022-12-09 06:59:37 -05:00
ejsc1 5656f90cdb
misc: update yapf version
* misc: update yapf version v2

* Update .pre-commit-config.yaml

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2022-11-26 22:37:32 -05:00
Peter F. Patel-Schneider 5cd3ac60c5 ui: eliminate visual glitch when updating range settings 2022-10-26 08:08:58 -04:00
Peter F. Patel-Schneider 5082ac9745 ui: allow config panel to scroll 2022-09-04 12:05:53 -04:00
Haochen Tong 1449a47263 ui: increase entry size for ChoiceControlBig 2022-07-07 16:13:52 -04:00
Peter F. Patel-Schneider 12217d6fa5 ui: implement packed range setting in config panel 2022-06-21 18:39:37 -04:00
Peter F. Patel-Schneider c9810e606e ui: only produce warning for unimplemented display of setting 2022-06-21 18:39:37 -04:00
Peter F. Patel-Schneider d90ee945ab device: use int instead of str for setting keys 2022-04-10 16:35:08 -04:00
Peter F. Patel-Schneider 681a06d8d7 ui: print backtrace when errors occur during writing settings 2022-03-16 20:22:25 -04:00
Vinícius 13dfac476b logitech_receiver: simplify param labels 2022-01-24 11:12:04 -05:00
Vinícius f5831cbda7 ui: build item with all sub-items for multiple range settings 2022-01-24 11:12:04 -05:00
Vinícius b9a23f133e ui: hide unsupported settings/keys/values 2022-01-24 11:12:04 -05:00
Peter F. Patel-Schneider 785675d469 ui: handle errors when writing to devices 2022-01-13 18:23:12 -05:00
Peter F. Patel-Schneider 2e94add3e3 ui: use classes for all config widgets 2022-01-13 18:23:12 -05:00
Peter F. Patel-Schneider 9e018fc5bf ui: use classes for several config widgets 2022-01-13 18:23:12 -05:00
Peter F. Patel-Schneider 8a87b9b013 rules: add Solaar rules command to set settings
testing
2022-01-13 18:23:12 -05:00
Peter F. Patel-Schneider f7a0422956 ui: don't stretch toggles 2021-12-29 09:56:53 -05:00
Christian Tacke 49e9240be9
ui: Use GtkButton for the Lock Icon
Instead of GtkEventBox use GtkButton for the lock icons.

GtkEventBox does not have any visual feedback that it
actually can be pressed. As in: If you don't know that this
is an area for interaction it is not obvious.

Using Gtk.ReliefStyle.NONE on the GtkButton keeps the old
styling but still gives feedback when hovering over the
buttons.

Co-authored-by: Christian Tacke <8560110+ChristianTacke@users.noreply.github.com>
2021-12-28 12:27:03 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Hugo Osvaldo Barrera b96d16672b Drop obsolete encoding declaration
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Peter F. Patel-Schneider a9adc06b7a ui: correctly determine setting box in change_click method 2021-09-24 10:17:59 -04:00
Peter F. Patel-Schneider 14c2ac6959 po: make common button names translatable and show translations 2021-08-06 18:30:52 -04:00
Peter F. Patel-Schneider 42624c7102 ui: write persisted value when changing from ignoring a setting 2021-04-17 10:32:24 -04:00
Peter F. Patel-Schneider b3a6dc5b2e ui: update map all settings that are not None 2021-04-17 10:32:24 -04:00
Peter F. Patel-Schneider a1dc69d203 ui: make ignore settings not sensitive at startup 2021-04-13 13:27:59 -04:00
Peter F. Patel-Schneider 33a4bf8bf5 ui: read current value of setting when switching away from ignore 2021-04-12 07:39:35 -04:00
Peter F. Patel-Schneider b34061c766 ui: add ability to ignore a Solaar setting 2021-04-12 07:39:35 -04:00