From c8a8b79fd904fb289bda6266b84464a9157e5d83 Mon Sep 17 00:00:00 2001 From: Rob Trame <3004637+r6e@users.noreply.github.com> Date: Sun, 15 Mar 2026 20:19:26 -0600 Subject: [PATCH] feat(taskbar): Remove WPF TaskbarItemInfo dead code [P2-015] (#81) * feat(taskbar): Remove WPF TaskbarItemInfo dead code [P2-015] - Delete StatusToTaskbarStateConverter.cs: converter was already migrated to Avalonia IValueConverter returning null (no-op stub), and was not referenced by any XAML or C# consumer - Remove empty InitTaskbarInfo() stub and its [SupportedOSPlatform("windows")] guard from MainWindow.xaml.cs: no taskbar progress implementation exists; accepting silent omission per the issue acceptance criteria - Remove now-unused 'using System.Runtime.Versioning' from MainWindow.xaml.cs No System.Windows.Shell references remain anywhere in the codebase. App does not crash on Linux. Taskbar progress is silently omitted. Closes #27 * Update outdated comment --- FModel/MainWindow.xaml | 3 ++- FModel/MainWindow.xaml.cs | 11 --------- .../StatusToTaskbarStateConverter.cs | 24 ------------------- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 FModel/Views/Resources/Converters/StatusToTaskbarStateConverter.cs diff --git a/FModel/MainWindow.xaml b/FModel/MainWindow.xaml index 1b2c75c4..ad76d152 100644 --- a/FModel/MainWindow.xaml +++ b/FModel/MainWindow.xaml @@ -16,7 +16,8 @@ diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs index f41232f2..0cab111b 100644 --- a/FModel/MainWindow.xaml.cs +++ b/FModel/MainWindow.xaml.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel; using System.Linq; -using System.Runtime.Versioning; using System.Threading.Tasks; using Avalonia; using Avalonia.Controls; @@ -47,16 +46,6 @@ public partial class MainWindow : Window _applicationView.PropertyChanged += OnApplicationViewPropertyChanged; UpdateWindowTitle(); - // Windows-only: set up TaskbarItemInfo progress - if (OperatingSystem.IsWindows()) - InitTaskbarInfo(); - } - - [SupportedOSPlatform("windows")] - private void InitTaskbarInfo() - { - // TODO(P2-015): set up Windows taskbar progress indicator once - // StatusToTaskbarStateConverter is migrated. } private void UpdateWindowTitle() diff --git a/FModel/Views/Resources/Converters/StatusToTaskbarStateConverter.cs b/FModel/Views/Resources/Converters/StatusToTaskbarStateConverter.cs deleted file mode 100644 index fc67f4c9..00000000 --- a/FModel/Views/Resources/Converters/StatusToTaskbarStateConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Globalization; -using Avalonia.Data.Converters; - -namespace FModel.Views.Resources.Converters; - -/// -/// Stub: Avalonia has no cross-platform TaskbarItemProgressState equivalent. -/// Returns null; actual taskbar integration is tracked by TODO(P2-015). -/// Previously mapped EStatusKind to System.Windows.Shell.TaskbarItemProgressState. -/// -public class StatusToTaskbarStateConverter : IValueConverter -{ - public static readonly StatusToTaskbarStateConverter Instance = new(); - - public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) - { - // TODO(P2-015): Implement via Avalonia taskbar API when available. - return null; - } - - public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) - => throw new NotImplementedException(); -}