Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions Freizeichen.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/Freizeichen.App/Freizeichen.App.csproj" />
<Project Path="src/Freizeichen.AppLogic/Freizeichen.AppLogic.csproj" />
<Project Path="src/Freizeichen.Domain/Freizeichen.Domain.csproj" />
<Project Path="src/Freizeichen.Modem/Freizeichen.Modem.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Freizeichen.App.Tests/Freizeichen.App.Tests.csproj" />
<Project Path="tests/Freizeichen.AppLogic.Tests/Freizeichen.AppLogic.Tests.csproj" />
<Project Path="tests/Freizeichen.Domain.Tests/Freizeichen.Domain.Tests.csproj" />
<Project Path="tests/Freizeichen.Modem.Tests/Freizeichen.Modem.Tests.csproj" />
</Folder>
</Solution>
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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 <Nummer>` und schließt sie wieder.
AT-Befehle. Freizeichen öffnet diese Schnittstelle, sendet `ATD <Nummer>` und schließt sie wieder.

## Status

Expand Down
14 changes: 0 additions & 14 deletions Waehlhilfe.slnx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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;

/// <summary>Wires Wählhilfe by hand: no container.</summary>
/// <summary>Wires Freizeichen by hand: no container.</summary>
internal sealed class CompositionRoot
{
private readonly JsonSettingsStore _store = new JsonSettingsStore(JsonSettingsStore.DefaultPath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName>Waehlhilfe</AssemblyName>
<RootNamespace>Waehlhilfe.App</RootNamespace>
<Product>Wählhilfe</Product>
<AssemblyTitle>Wählhilfe</AssemblyTitle>
<AssemblyName>Freizeichen</AssemblyName>
<RootNamespace>Freizeichen.App</RootNamespace>
<Product>Freizeichen</Product>
<AssemblyTitle>Freizeichen</AssemblyTitle>
<Version>0.1.0</Version>
<!-- LibraryImport marshals the CoreFoundation strings of the macOS tel: registration. -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -20,11 +20,11 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Waehlhilfe.AppLogic\Waehlhilfe.AppLogic.csproj" />
<ProjectReference Include="..\Freizeichen.AppLogic\Freizeichen.AppLogic.csproj" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Waehlhilfe.App.Tests" />
<InternalsVisibleTo Include="Freizeichen.App.Tests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Waehlhilfe.App.WaehlhilfeApp"
x:Class="Freizeichen.App.FreizeichenApp"
x:ClassModifier="internal"
RequestedThemeVariant="Default">
<Application.Styles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace Waehlhilfe.App;
namespace Freizeichen.App;

internal static class LaunchArguments
{
/// <summary>
/// The <c>tel:</c> link Windows and Linux pass on the command line when a link is clicked,
/// or <c>null</c> when Wählhilfe was started on its own. macOS delivers links as an Apple
/// or <c>null</c> when Freizeichen was started on its own. macOS delivers links as an Apple
/// event instead, which arrives through <c>IActivatableLifetime</c>.
/// </summary>
public static string? TelLink(IEnumerable<string> args) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/// <summary>The bundle declares <c>tel</c> in CFBundleURLTypes; Launch Services picks the default.</summary>
[SupportedOSPlatform("macos")]
internal sealed partial class MacTelHandlerRegistration : ITelHandlerRegistration
{
/// <summary>Must match CFBundleIdentifier in packaging/macos/build-dmg.sh.</summary>
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";
Expand Down
12 changes: 12 additions & 0 deletions src/Freizeichen.App/Platform/UnsupportedTelHandlerRegistration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Freizeichen.AppLogic;

namespace Freizeichen.App.Platform;

/// <summary>Linux: Freizeichen dials there (it is where the DL500A is tested), but ships no handler registration.</summary>
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.");
}
Original file line number Diff line number Diff line change
@@ -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;

/// <summary>
/// The MSI registers Wählhilfe as *capable* of handling <c>tel:</c> (ProgId, Capabilities,
/// The MSI registers Freizeichen as *capable* of handling <c>tel:</c> (ProgId, Capabilities,
/// RegisteredApplications). Windows lets no program make itself the default, so this opens the
/// Settings page where the user picks it once.
/// </summary>
[SupportedOSPlatform("windows")]
internal sealed class WindowsTelHandlerRegistration : ITelHandlerRegistration
{
/// <summary>Must match the ProgId and the RegisteredApplications name in packaging/windows/Waehlhilfe.wxs.</summary>
internal const string ProgId = "Waehlhilfe.tel";
/// <summary>Must match the ProgId and the RegisteredApplications name in packaging/windows/Freizeichen.wxs.</summary>
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";

Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Avalonia;

namespace Waehlhilfe.App;
namespace Freizeichen.App;

internal static class Program
{
Expand All @@ -9,7 +9,7 @@ public static void Main(string[] args) =>
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);

public static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<WaehlhilfeApp>()
AppBuilder.Configure<FreizeichenApp>()
.UsePlatformDetect()
.WithInterFont();
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:Waehlhilfe.AppLogic.ViewModels;assembly=Waehlhilfe.AppLogic"
x:Class="Waehlhilfe.App.Views.DialWindow"
xmlns:vm="clr-namespace:Freizeichen.AppLogic.ViewModels;assembly=Freizeichen.AppLogic"
x:Class="Freizeichen.App.Views.DialWindow"
x:ClassModifier="internal"
x:DataType="vm:DialViewModel"
Title="Wählhilfe – Anrufen"
Title="Freizeichen – Anrufen"
Width="420" SizeToContent="Height"
CanResize="False" Topmost="True"
WindowStartupLocation="CenterScreen">
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:Waehlhilfe.AppLogic.ViewModels;assembly=Waehlhilfe.AppLogic"
x:Class="Waehlhilfe.App.Views.SettingsWindow"
xmlns:vm="clr-namespace:Freizeichen.AppLogic.ViewModels;assembly=Freizeichen.AppLogic"
x:Class="Freizeichen.App.Views.SettingsWindow"
x:ClassModifier="internal"
x:DataType="vm:SettingsViewModel"
Title="Wählhilfe"
Title="Freizeichen"
Width="520" SizeToContent="Height"
WindowStartupLocation="CenterScreen">
<Window.Styles>
Expand All @@ -23,7 +23,7 @@
</Window.Styles>

<StackPanel Margin="24" Spacing="10">
<TextBlock Text="Wählhilfe" FontSize="22" FontWeight="SemiBold" />
<TextBlock Text="Freizeichen" FontSize="22" FontWeight="SemiBold" />
<TextBlock Classes="hint" Text="Wählt tel:-Links über ein Gigaset DL500A per Bluetooth." />

<TextBlock Classes="section" Text="Telefon" />
Expand Down Expand Up @@ -58,7 +58,7 @@
</Grid>

<TextBlock Classes="section" Text="tel:-Links" />
<TextBlock x:Name="IsDefaultText" Text="Wählhilfe öffnet tel:-Links." IsVisible="{Binding IsDefaultHandler}" />
<TextBlock x:Name="IsDefaultText" Text="Freizeichen öffnet tel:-Links." IsVisible="{Binding IsDefaultHandler}" />
<TextBlock x:Name="NotDefaultText" Classes="hint" Text="Ein anderes Programm öffnet tel:-Links." IsVisible="{Binding !IsDefaultHandler}" />
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="MakeDefaultButton" Content="Als Standard festlegen" Command="{Binding MakeDefaultHandlerCommand}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Avalonia.Controls;

namespace Waehlhilfe.App.Views;
namespace Freizeichen.App.Views;

internal sealed partial class SettingsWindow : Window
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="Waehlhilfe"/>
<assemblyIdentity version="1.0.0.0" name="Freizeichen"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,22 +301,22 @@
"resolved": "0.94.1",
"contentHash": "11YMr7FnAbL83bQmVxlhbIKHvSLxjO81D12Ej0QMSGXMDTxNA9MTOa4MQxx43nv5el/efuPHwzyrj6a5ha2gug=="
},
"waehlhilfe.applogic": {
"freizeichen.applogic": {
"type": "Project",
"dependencies": {
"CommunityToolkit.Mvvm": "[8.4.2, )",
"Waehlhilfe.Domain": "[1.0.0, )",
"Waehlhilfe.Modem": "[1.0.0, )"
"Freizeichen.Domain": "[1.0.0, )",
"Freizeichen.Modem": "[1.0.0, )"
}
},
"waehlhilfe.domain": {
"freizeichen.domain": {
"type": "Project"
},
"waehlhilfe.modem": {
"freizeichen.modem": {
"type": "Project",
"dependencies": {
"System.IO.Ports": "[10.0.14, )",
"Waehlhilfe.Domain": "[1.0.0, )"
"Freizeichen.Domain": "[1.0.0, )",
"System.IO.Ports": "[10.0.14, )"
}
},
"Avalonia.Skia": {
Expand Down
Loading
Loading