Audio cues: add send/receive on-off and minimise/restore cues (2 sounds each), drop .sfk byproducts
Six new machine-wide cues, each with the same numbered-variant + Preferences treatment as
the others (enable tickbox, Choose default sound picker, Play/Browse):
- Send turned on / off, Receive turned on / off: fire from OnStreamingCheckboxChanged, so
they sound whether the user clicked the in-window tickbox or pressed the mute shortcut
(the hotkey flips .Checked, which routes through the same handler). Suppressed during
profile load by the existing password-gate guard, so loading a profile doesn't blast them.
- Minimise (hide) / Restore (show): fire from the tray controller's Minimize()/Restore() on a
genuine visibility transition (guarded against no-op / startup-minimise).
Enable flags + custom-WAV overrides for these six live machine-wide in AppConfig
(EnableSendOnCue.., MachineCueCustomPaths) - they're app-level feedback, not per-profile
audio - so no Profile/settings-cache plumbing. TryLoadCueSound now also honours the
machine-wide custom path. PreferencesDialog gains a MachineRow helper + the six rows.
Sounds: shipped via the existing sounds\*.wav wildcard. Fixed an obvious typo in the
supplied files ("rcieve off 1.wav" -> "recieve off 1.wav") so receive-off has both variants.
Renamed the old single-name cue WAVs to Ed's numbered-variant set; added key/passkey and the
new cue sounds.
build-release.ps1: new step deletes the SoundForge .sfk peak-file byproducts from sounds\
before packaging (they never shipped - build is *.wav only - this just keeps the tree tidy).
Tests + manual updated for the six new cues.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e526014e6a
commit
8763470037
@@ -201,6 +201,8 @@ internal sealed class MainFormTrayController : IDisposable
|
||||
|
||||
public void Restore()
|
||||
{
|
||||
// Only sound the "show" cue on a genuine hidden -> shown transition, not a no-op restore.
|
||||
var wasHidden = !owner.Visible || owner.WindowState == FormWindowState.Minimized;
|
||||
owner.Show();
|
||||
if (owner.WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
@@ -218,6 +220,7 @@ internal sealed class MainFormTrayController : IDisposable
|
||||
// to actually hear the new content.
|
||||
try { SetForegroundWindow(owner.Handle); } catch { /* harmless — Restore still mostly worked */ }
|
||||
trayIcon.Visible = false;
|
||||
if (wasHidden) (owner as MainForm)?.PlayWindowVisibilityCue(show: true);
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
@@ -226,7 +229,11 @@ internal sealed class MainFormTrayController : IDisposable
|
||||
|
||||
public void Minimize()
|
||||
{
|
||||
// Only sound the "hide" cue on a genuine shown -> hidden transition (not a startup-minimise
|
||||
// before the window has ever been shown, nor a repeat call once already hidden).
|
||||
var wasVisible = owner.Visible;
|
||||
owner.Hide();
|
||||
if (wasVisible) (owner as MainForm)?.PlayWindowVisibilityCue(show: false);
|
||||
// Refresh the tooltip BEFORE showing the icon so the shell's NIM_ADD call carries
|
||||
// the current live state (peer count, send / receive routing, recording timer),
|
||||
// not a stale "starting up" string set earlier. The shell tends to cache hover
|
||||
|
||||
Reference in New Issue
Block a user