P2 leftovers: every inline dialog now audited + one shared sample clamp (review complete bar peer extraction)
Inline-built dialogs were invisible to the accessibility audit - which is exactly how mnemonic-less buttons kept slipping through (the single-instance dialog Andre caught, and now TWO more found by this very change: ManualPeerPrompt's OK/Cancel and ProfileSaveAsPrompt's Cancel had no mnemonics - both fixed). Each inline dialog's construction is split from its ShowDialog into a Build seam, and the audit now covers 15 dialog surfaces (was 8): manual peer prompt, quick profile switch, change password, password manager, profile name prompt, and the service Additional-options window join the eight Form dialogs. Behaviour unchanged. The encoder-boundary clamp is now ONE shared rule (Core SampleClamp) instead of three private copies in MixingEngine / AsioCaptureBackend / PushModeWasapiBackend - and the ASIO copy's up-to-four interlocked increments per frame became one batched add per buffer on the RT thread. Pinned by a new self-test (over-range clamps to exactly +/-1 and counts; +/-1 exactly passes untouched). Gate 61/61. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,10 +14,22 @@ namespace RemSound.App;
|
||||
internal static class ProfilePasswordManagerDialog
|
||||
{
|
||||
public static bool Show(IWin32Window owner, ProfileStore store)
|
||||
{
|
||||
var (dialog, rows) = Build(store);
|
||||
using (dialog)
|
||||
{
|
||||
if (dialog.ShowDialog(owner) != DialogResult.OK) return false;
|
||||
return SaveChanges(store, rows);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Construction split from ShowDialog so the accessibility audit can inspect the real
|
||||
/// dialog (inline-built dialogs used to be invisible to the audit).</summary>
|
||||
internal static (Form Dialog, List<(string Title, string Original, TextBox Box)> Rows) Build(ProfileStore store)
|
||||
{
|
||||
var titles = store.ListProfileTitles();
|
||||
|
||||
using var dialog = new Form
|
||||
var dialog = new Form
|
||||
{
|
||||
Text = "Profile passwords",
|
||||
StartPosition = FormStartPosition.CenterParent,
|
||||
@@ -77,9 +89,11 @@ internal static class ProfilePasswordManagerDialog
|
||||
dialog.Controls.Add(intro);
|
||||
dialog.AcceptButton = okButton;
|
||||
dialog.CancelButton = cancelButton;
|
||||
return (dialog, rows);
|
||||
}
|
||||
|
||||
if (dialog.ShowDialog(owner) != DialogResult.OK) return false;
|
||||
|
||||
private static bool SaveChanges(ProfileStore store, List<(string Title, string Original, TextBox Box)> rows)
|
||||
{
|
||||
var changedAny = false;
|
||||
foreach (var (title, original, box) in rows)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user