feat(systray): add volume limiter toggle to tray menu#40
Conversation
5955d25 to
3e74427
Compare
3e74427 to
b6fac77
Compare
|
Hello @CaWu009 , I'm sorry, but I can't accept this merge request at this stage: the setting is not supported on all devices, and would lead to confusion for people not having it. I can propose you a couple of alternative solutions:
In any case both the solutions would need a management whenever the device is turned on (refresh of the toggable options / shortcuts) and off (removal of toggable options / shortcuts) |
Generalizes the hard-coded volume_limiter tray entry into a per-device, user-selectable set of toggle shortcuts (addresses PR elegos#40 review feedback): - New Systray toggles section in the main window to choose which of the connected device's TOGGLE settings appear in the tray. Driven entirely by settings_config (no hard-coding); only device-scoped toggles are listed. - Per-device persistence of the selection (DeviceSettings.systray_toggles) with backward-compatible reading of the old flat settings-file format. - New SetSystrayToggle D-Bus method and systray_toggles field in the settings payload (UI preference; never drives the device). - Daemon emits SettingsChanged on device connect/disconnect so the panel and tray refresh on connect and clear on disconnect. - Systray renders only pinned toggles; toggling sends the int on/off value. - docs/dbus.md, CHANGELOG and i18n updated; unit tests for settings and the D-Bus service. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalizes the hard-coded volume_limiter tray entry into a per-device, user-selectable set of toggle shortcuts (addresses PR elegos#40 review feedback): - New Systray toggles section in the main window to choose which of the connected device's TOGGLE settings appear in the tray. Driven entirely by settings_config (no hard-coding); only device-scoped toggles are listed. - Per-device persistence of the selection (DeviceSettings.systray_toggles) with backward-compatible reading of the old flat settings-file format. - New SetSystrayToggle D-Bus method and systray_toggles field in the settings payload (UI preference; never drives the device). - Daemon emits SettingsChanged on device connect/disconnect so the panel and tray refresh on connect and clear on disconnect. - Systray renders only pinned toggles; toggling sends the int on/off value. - docs/dbus.md, CHANGELOG and i18n updated; unit tests for settings and the D-Bus service.
062733f to
eea93a4
Compare
|
Thanks for the detailed feedback — makes sense, hard-coding a single setting wasn’t the right approach. I’ve reworked the PR around Option 1. The volume-limiter special case is gone now. Instead, there’s a new “Systray toggles” section in the main window where the user can pick which toggle settings should show up in the tray menu. The list is built from A few other changes included:
I left the keyboard-shortcuts part out for now to keep this PR focused. That can be a separate change later if you still want it. One thing I’m not fully sure about is the layout: I put this in its own side-panel section for now, but I can also move it into the existing Device panel, for example as a “show in tray” checkbox next to each toggle. |
What
Adds a volume limiter toggle to the system tray context menu,
positioned below "Open Arctis Manager".
The toggle is only shown when the connected device supports
volume limiter (Nova 5, Nova 7, Nova Pro).
Why
Previously, toggling volume limiter required opening the full
main window. This makes it accessible with a single right-click
on the tray icon.
Changes
systray_app.py: subscribe to settings, add checkableQAction for volume limiter
dbus_wrapper.py: subscribe to SettingsChanged D-Bus signalso all clients stay in sync when settings change from any source