[ux] Add audio device prompt suppression controls#2926
Conversation
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Thanks @jensenpat — this looks good. The implementation matches AetherSDR conventions cleanly:
- Uses
AppSettings::instance()with the"True"/"False"string idiom that's standard across the codebase. - Placement of the suppression gate after the
!deviceAddedearly return preserves the removal-fallback path (clearing a missing selected device to system default) even when the prompt is suppressed — which matches what you describe in the PR body. - The Radio Setup checkbox uses
thisas the connection context, so the binding cleans up correctly with the dialog. - Documentation is updated and the dialog stylesheet picks up the new
QCheckBoxrules.
A couple of small, non-blocking observations:
-
Duplicated key constant.
kSuppressAudioDeviceNotificationsKeyis defined identically in bothMainWindow.cppandRadioSetupDialog.cpp. If this setting grows additional consumers (e.g. AppSettings migration code), consider promoting it to a shared header alongside the other audio setting keys. Not worth churn for this PR alone. -
Coordination with #2913. That open PR (
fix(audio): suppress Linux hotplug dialog when current selection still works) edits the samehandleAudioDeviceListChanged()flow. The two changes are logically complementary (it suppresses spurious prompts when the existing selection is still valid; this gives the user a manual escape hatch), but whichever lands second will need a small rebase. Worth a heads-up to the other PR's author. -
Persisting suppression on Cancel. As you noted in the PR body, checking "Don't ask me again" and clicking Cancel still persists the suppression. This is a reasonable UX choice given the Radio Setup checkbox is the documented re-enable path, and the docs change makes that discoverable. Just flagging that you've already considered it.
LGTM on functionality, conventions, and scope. No blocking concerns from me.
|
Claude here — merged. Thanks @jensenpat, this is the right opt-out What stood out on review: The inverse-linked UI handling — "Don't ask me again" in the popup The critical design detail: suppression bypasses the selection Persistence on either OK or Cancel is also right — if the user has Ships in v26.5.3. 73, |
Conflict: main added kSuppressAudioDeviceNotificationsKey (aethersdr#2926) adjacent to this PR's 230-line CopyValueButton helper block at the top of RadioSetupDialog.cpp's anonymous namespace. Independent additions; keep both. Nit #2 (visual disable on empty/dash): CopyValueButton paintEvent now queries m_valueProvider for the disabled-stroke color decision, surfacing the unset-license / no-data case visually. Click handler already silently no-ops for these, so no external setEnabled wiring needed. Nit #3 (showCopiedPopup screen-null fallback): the old fallback QRect(pos, popupSize) made std::clamp a no-op. Now uses QGuiApplication::primaryScreen() availableGeometry, and skips clamping entirely if neither anchor's nor primary screen is available. Leaving nit #1 (consolidate 4 infoChanged connections into 1) alone — bot called it tidiness, not a bug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Don't ask me againcheckbox to the Audio Device Detected dialog.SuppressAudioDeviceNotifications=TrueinAppSettingsso future new-device notifications can be permanently suppressed.Prompt on Audio Device Changescheckbox in Radio Setup > Audio > PC Audio Devices so users can re-enable or disable prompting from settings.Behavior Notes
The dialog-level checkbox is intentionally one-way from the prompt itself: checking
Don't ask me againsuppresses future new audio device prompts whether the current dialog is accepted or canceled. The Radio Setup checkbox is the user-facing toggle for changing that preference later: checked means prompts are enabled; unchecked meansSuppressAudioDeviceNotifications=Trueis active.The suppression gate only bypasses new-device selection prompts. Removal handling is left intact, so if the selected input or output disappears, AetherSDR still clears that stale selection and falls back to the current system default as before.
Validation
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfocmake --build build -j22iconutil, per project build guidance.ctest --test-dir build --output-on-failure -j22👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat