Give each operator his windows back

The program stored an operator's window positions but never used them at
startup: the entry window was not placed and no window was reopened. It
now restores the whole screen both at startup and on a change of
operator: the windows that operator had open, where he had them, and the
ones he did not have closed.

The second radio's entry window no longer saves the layout. It has none
of the other windows open, so saving from it dropped every window the
first one had.

Ctrl+O gets six buttons for the operators last at the radio, newest
first. One click changes to that operator.

The recordings folder is no longer asked for. It is `Wav/<callsign>`
under the data folder, which is where N1MM plays them from, so
`StoredOperator.WavPath` is gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
2026-09-10 13:58:12 +00:00
co-authored by Claude Opus 5
parent 66e9a0ab65
commit f2d9e331b4
7 changed files with 114 additions and 53 deletions
+16 -2
View File
@@ -107,7 +107,6 @@ public class SettingsTests : IDisposable
{
Callsign = "OM3KFF",
Theme = "dark",
WavPath = "/home/erik/wav/om3kff",
Windows = [new StoredWindow { Name = "BandmapWindow", X = 10, Y = 20, Width = 300, Height = 400 }],
},
],
@@ -119,11 +118,26 @@ public class SettingsTests : IDisposable
StoredOperator stored = Assert.Single(read.Operators);
Assert.Equal("OM3KFF", read.CurrentOperator);
Assert.Equal("dark", stored.Theme);
Assert.Equal("/home/erik/wav/om3kff", stored.WavPath);
StoredWindow window = Assert.Single(stored.Windows);
Assert.Equal(("BandmapWindow", 10, 20), (window.Name, window.X, window.Y));
}
/// The operator list is kept in the order operators took the radio, so the
/// dialog's recent buttons read it backwards and stop at the count asked
/// for.
[Fact]
public void RecentOperatorsAreNewestFirst()
{
Settings settings = new()
{
Operators = [.. new[] { "OM1AB", "OM2CD", "OM3EF", "OM4GH" }
.Select(call => new StoredOperator { Callsign = call })],
};
Assert.Equal(["OM4GH", "OM3EF", "OM2CD"],
settings.RecentOperators(3).Select(o => o.Callsign));
}
[Fact]
public void AFileFromBeforeOperatorsHasNone()
{