diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ab4f11f..3c8c5a7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,7 +14,7 @@ updates: # NuGet packages; Avalonia moves in lockstep, so its packages arrive as one pull request. # Dependabot rewrites only the lock file of the project that references a package directly: - # run `dotnet restore Waehlhilfe.slnx --force-evaluate` on its branch and push the result. + # run `dotnet restore Freizeichen.slnx --force-evaluate` on its branch and push the result. - package-ecosystem: nuget directory: / schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df0409b..36f1c94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - # Windows and macOS are the platforms Wählhilfe ships for; Linux is where the + # Windows and macOS are the platforms Freizeichen ships for; Linux is where the # DL500A is tested by hand today and where the format check runs. os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -40,14 +40,14 @@ jobs: dotnet-version: '10.0.x' - name: Restore - run: dotnet restore Waehlhilfe.slnx --locked-mode + run: dotnet restore Freizeichen.slnx --locked-mode - name: Build - run: dotnet build Waehlhilfe.slnx -c Release --no-restore + run: dotnet build Freizeichen.slnx -c Release --no-restore - name: Test - run: dotnet test Waehlhilfe.slnx -c Release --no-build + run: dotnet test Freizeichen.slnx -c Release --no-build - name: Format check if: matrix.os == 'ubuntu-latest' - run: dotnet format Waehlhilfe.slnx --verify-no-changes --no-restore + run: dotnet format Freizeichen.slnx --verify-no-changes --no-restore diff --git a/AGENTS.md b/AGENTS.md index 55652a8..38b9f7f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Agent instructions -Wählhilfe registers as the operating system's `tel:` handler and dials the number on a Gigaset +Freizeichen registers as the operating system's `tel:` handler and dials the number on a Gigaset DL500A over Bluetooth. It exists so that Lagebuch (CodeForFire/lagebuch) and every other program in the ELW can keep emitting plain `tel:` links; see CodeForFire/lagebuch#617 for how the protocol was found. @@ -39,7 +39,7 @@ Einsatzkraft). Keep UI wording short and imperative; it is read in a command veh only when it needs that one's code; the body then says "Stacked on #N, review only the last commit". - A pull request that touches a view carries before/after PNGs rendered with the headless Skia - harness in `tests/Waehlhilfe.App.Tests`, attached with `gh pr create --attach`. + harness in `tests/Freizeichen.App.Tests`, attached with `gh pr create --attach`. ## GitHub Actions diff --git a/Freizeichen.slnx b/Freizeichen.slnx new file mode 100644 index 0000000..3bba25c --- /dev/null +++ b/Freizeichen.slnx @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Makefile b/Makefile index edeccd2..c63452f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SLN := Waehlhilfe.slnx -APP := src/Waehlhilfe.App/Waehlhilfe.App.csproj +SLN := Freizeichen.slnx +APP := src/Freizeichen.App/Freizeichen.App.csproj .PHONY: help restore build test ci format format-check run clean diff --git a/README.md b/README.md index eec6141..9cb0128 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Wählhilfe +# Freizeichen + +*Ein Klick auf die Nummer – das Telefon wählt.* Wählt `tel:`-Links über ein Gigaset DL500A – per Bluetooth, ohne Gigaset QuickSync, TAPI oder CSTA. @@ -9,7 +11,7 @@ auf; das Gespräch wird am Telefon geführt. ## So funktioniert es Das DL500A stellt über Bluetooth eine serielle Schnittstelle (SPP) bereit und versteht dort -AT-Befehle. Wählhilfe öffnet diese Schnittstelle, sendet `ATD ` und schließt sie wieder. +AT-Befehle. Freizeichen öffnet diese Schnittstelle, sendet `ATD ` und schließt sie wieder. ## Status diff --git a/Waehlhilfe.slnx b/Waehlhilfe.slnx deleted file mode 100644 index 6763e25..0000000 --- a/Waehlhilfe.slnx +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/Waehlhilfe.App/CompositionRoot.cs b/src/Freizeichen.App/CompositionRoot.cs similarity index 81% rename from src/Waehlhilfe.App/CompositionRoot.cs rename to src/Freizeichen.App/CompositionRoot.cs index 437039e..e1acab2 100644 --- a/src/Waehlhilfe.App/CompositionRoot.cs +++ b/src/Freizeichen.App/CompositionRoot.cs @@ -1,11 +1,11 @@ -using Waehlhilfe.App.Platform; -using Waehlhilfe.AppLogic; -using Waehlhilfe.AppLogic.ViewModels; -using Waehlhilfe.Modem; +using Freizeichen.App.Platform; +using Freizeichen.AppLogic; +using Freizeichen.AppLogic.ViewModels; +using Freizeichen.Modem; -namespace Waehlhilfe.App; +namespace Freizeichen.App; -/// Wires Wählhilfe by hand: no container. +/// Wires Freizeichen by hand: no container. internal sealed class CompositionRoot { private readonly JsonSettingsStore _store = new JsonSettingsStore(JsonSettingsStore.DefaultPath()); diff --git a/src/Waehlhilfe.App/Waehlhilfe.App.csproj b/src/Freizeichen.App/Freizeichen.App.csproj similarity index 66% rename from src/Waehlhilfe.App/Waehlhilfe.App.csproj rename to src/Freizeichen.App/Freizeichen.App.csproj index f6de772..740a8cf 100644 --- a/src/Waehlhilfe.App/Waehlhilfe.App.csproj +++ b/src/Freizeichen.App/Freizeichen.App.csproj @@ -3,10 +3,10 @@ WinExe app.manifest - Waehlhilfe - Waehlhilfe.App - Wählhilfe - Wählhilfe + Freizeichen + Freizeichen.App + Freizeichen + Freizeichen 0.1.0 true @@ -20,11 +20,11 @@ - + - + diff --git a/src/Waehlhilfe.App/WaehlhilfeApp.axaml b/src/Freizeichen.App/FreizeichenApp.axaml similarity index 84% rename from src/Waehlhilfe.App/WaehlhilfeApp.axaml rename to src/Freizeichen.App/FreizeichenApp.axaml index 09a5c57..103ada4 100644 --- a/src/Waehlhilfe.App/WaehlhilfeApp.axaml +++ b/src/Freizeichen.App/FreizeichenApp.axaml @@ -1,6 +1,6 @@ diff --git a/src/Waehlhilfe.App/WaehlhilfeApp.axaml.cs b/src/Freizeichen.App/FreizeichenApp.axaml.cs similarity index 95% rename from src/Waehlhilfe.App/WaehlhilfeApp.axaml.cs rename to src/Freizeichen.App/FreizeichenApp.axaml.cs index 22d1cb1..43c0e2e 100644 --- a/src/Waehlhilfe.App/WaehlhilfeApp.axaml.cs +++ b/src/Freizeichen.App/FreizeichenApp.axaml.cs @@ -3,11 +3,11 @@ using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; using Avalonia.Threading; -using Waehlhilfe.App.Views; +using Freizeichen.App.Views; -namespace Waehlhilfe.App; +namespace Freizeichen.App; -internal sealed partial class WaehlhilfeApp : Application +internal sealed partial class FreizeichenApp : Application { // How long macOS gets to deliver the link that launched the app before the settings open. private static readonly TimeSpan LaunchLinkGrace = TimeSpan.FromMilliseconds(500); diff --git a/src/Waehlhilfe.App/LaunchArguments.cs b/src/Freizeichen.App/LaunchArguments.cs similarity index 76% rename from src/Waehlhilfe.App/LaunchArguments.cs rename to src/Freizeichen.App/LaunchArguments.cs index 8746874..98cf747 100644 --- a/src/Waehlhilfe.App/LaunchArguments.cs +++ b/src/Freizeichen.App/LaunchArguments.cs @@ -1,10 +1,10 @@ -namespace Waehlhilfe.App; +namespace Freizeichen.App; internal static class LaunchArguments { /// /// The tel: link Windows and Linux pass on the command line when a link is clicked, - /// or null when Wählhilfe was started on its own. macOS delivers links as an Apple + /// or null when Freizeichen was started on its own. macOS delivers links as an Apple /// event instead, which arrives through IActivatableLifetime. /// public static string? TelLink(IEnumerable args) => diff --git a/src/Waehlhilfe.App/Platform/MacTelHandlerRegistration.cs b/src/Freizeichen.App/Platform/MacTelHandlerRegistration.cs similarity index 95% rename from src/Waehlhilfe.App/Platform/MacTelHandlerRegistration.cs rename to src/Freizeichen.App/Platform/MacTelHandlerRegistration.cs index aee22cd..93b5e1a 100644 --- a/src/Waehlhilfe.App/Platform/MacTelHandlerRegistration.cs +++ b/src/Freizeichen.App/Platform/MacTelHandlerRegistration.cs @@ -1,16 +1,16 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; -using Waehlhilfe.AppLogic; +using Freizeichen.AppLogic; -namespace Waehlhilfe.App.Platform; +namespace Freizeichen.App.Platform; /// The bundle declares tel in CFBundleURLTypes; Launch Services picks the default. [SupportedOSPlatform("macos")] internal sealed partial class MacTelHandlerRegistration : ITelHandlerRegistration { /// Must match CFBundleIdentifier in packaging/macos/build-dmg.sh. - internal const string BundleId = "io.github.deepdiver1975.waehlhilfe"; + internal const string BundleId = "io.github.deepdiver1975.freizeichen"; private const string CoreFoundation = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation"; private const string CoreServices = "/System/Library/Frameworks/CoreServices.framework/CoreServices"; diff --git a/src/Freizeichen.App/Platform/UnsupportedTelHandlerRegistration.cs b/src/Freizeichen.App/Platform/UnsupportedTelHandlerRegistration.cs new file mode 100644 index 0000000..3ab2160 --- /dev/null +++ b/src/Freizeichen.App/Platform/UnsupportedTelHandlerRegistration.cs @@ -0,0 +1,12 @@ +using Freizeichen.AppLogic; + +namespace Freizeichen.App.Platform; + +/// Linux: Freizeichen dials there (it is where the DL500A is tested), but ships no handler registration. +internal sealed class UnsupportedTelHandlerRegistration : ITelHandlerRegistration +{ + public bool IsDefaultHandler() => false; + + public Task MakeDefaultAsync(CancellationToken cancellationToken = default) => + throw new PlatformNotSupportedException("Freizeichen registers as the tel: handler on Windows and macOS only."); +} diff --git a/src/Waehlhilfe.App/Platform/WindowsTelHandlerRegistration.cs b/src/Freizeichen.App/Platform/WindowsTelHandlerRegistration.cs similarity index 75% rename from src/Waehlhilfe.App/Platform/WindowsTelHandlerRegistration.cs rename to src/Freizeichen.App/Platform/WindowsTelHandlerRegistration.cs index d1e837a..1ea89f6 100644 --- a/src/Waehlhilfe.App/Platform/WindowsTelHandlerRegistration.cs +++ b/src/Freizeichen.App/Platform/WindowsTelHandlerRegistration.cs @@ -1,22 +1,22 @@ using System.Diagnostics; using System.Runtime.Versioning; +using Freizeichen.AppLogic; using Microsoft.Win32; -using Waehlhilfe.AppLogic; -namespace Waehlhilfe.App.Platform; +namespace Freizeichen.App.Platform; /// -/// The MSI registers Wählhilfe as *capable* of handling tel: (ProgId, Capabilities, +/// The MSI registers Freizeichen as *capable* of handling tel: (ProgId, Capabilities, /// RegisteredApplications). Windows lets no program make itself the default, so this opens the /// Settings page where the user picks it once. /// [SupportedOSPlatform("windows")] internal sealed class WindowsTelHandlerRegistration : ITelHandlerRegistration { - /// Must match the ProgId and the RegisteredApplications name in packaging/windows/Waehlhilfe.wxs. - internal const string ProgId = "Waehlhilfe.tel"; + /// Must match the ProgId and the RegisteredApplications name in packaging/windows/Freizeichen.wxs. + internal const string ProgId = "Freizeichen.tel"; - internal const string RegisteredApplicationName = "Waehlhilfe"; + internal const string RegisteredApplicationName = "Freizeichen"; private const string UserChoiceKey = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\tel\UserChoice"; @@ -28,7 +28,7 @@ public bool IsDefaultHandler() public Task MakeDefaultAsync(CancellationToken cancellationToken = default) { - // A fixed URI, nothing from input: the Settings page that lists Wählhilfe's link types. + // A fixed URI, nothing from input: the Settings page that lists Freizeichen's link types. using var _ = Process.Start(new ProcessStartInfo($"ms-settings:defaultapps?registeredAppMachine={RegisteredApplicationName}") { UseShellExecute = true, diff --git a/src/Waehlhilfe.App/Program.cs b/src/Freizeichen.App/Program.cs similarity index 79% rename from src/Waehlhilfe.App/Program.cs rename to src/Freizeichen.App/Program.cs index af33cbf..5ae5c0a 100644 --- a/src/Waehlhilfe.App/Program.cs +++ b/src/Freizeichen.App/Program.cs @@ -1,6 +1,6 @@ using Avalonia; -namespace Waehlhilfe.App; +namespace Freizeichen.App; internal static class Program { @@ -9,7 +9,7 @@ public static void Main(string[] args) => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); public static AppBuilder BuildAvaloniaApp() => - AppBuilder.Configure() + AppBuilder.Configure() .UsePlatformDetect() .WithInterFont(); } diff --git a/src/Waehlhilfe.App/Views/DialWindow.axaml b/src/Freizeichen.App/Views/DialWindow.axaml similarity index 88% rename from src/Waehlhilfe.App/Views/DialWindow.axaml rename to src/Freizeichen.App/Views/DialWindow.axaml index 60f4847..8f23ef2 100644 --- a/src/Waehlhilfe.App/Views/DialWindow.axaml +++ b/src/Freizeichen.App/Views/DialWindow.axaml @@ -1,10 +1,10 @@ diff --git a/src/Waehlhilfe.App/Views/DialWindow.axaml.cs b/src/Freizeichen.App/Views/DialWindow.axaml.cs similarity index 93% rename from src/Waehlhilfe.App/Views/DialWindow.axaml.cs rename to src/Freizeichen.App/Views/DialWindow.axaml.cs index 2eded01..cd40733 100644 --- a/src/Waehlhilfe.App/Views/DialWindow.axaml.cs +++ b/src/Freizeichen.App/Views/DialWindow.axaml.cs @@ -1,7 +1,7 @@ using Avalonia.Controls; -using Waehlhilfe.AppLogic.ViewModels; +using Freizeichen.AppLogic.ViewModels; -namespace Waehlhilfe.App.Views; +namespace Freizeichen.App.Views; internal sealed partial class DialWindow : Window { diff --git a/src/Waehlhilfe.App/Views/SettingsWindow.axaml b/src/Freizeichen.App/Views/SettingsWindow.axaml similarity index 90% rename from src/Waehlhilfe.App/Views/SettingsWindow.axaml rename to src/Freizeichen.App/Views/SettingsWindow.axaml index 3c954ad..e5e9e51 100644 --- a/src/Waehlhilfe.App/Views/SettingsWindow.axaml +++ b/src/Freizeichen.App/Views/SettingsWindow.axaml @@ -1,10 +1,10 @@ @@ -23,7 +23,7 @@ - + @@ -58,7 +58,7 @@ - +