Added Essentials AppActions - #200
Conversation
| <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'browser'"> | ||
| <PackageReference Include="Tmds.DBus" Version="0.92.0"> | ||
| <Aliases>TmdsDBus</Aliases> | ||
| </PackageReference> |
There was a problem hiding this comment.
This condition excludes only the browser TFM, so the packed net11.0 dependency group now includes Tmds.DBus for every desktop consumer, including Windows and macOS, even though the implementation only supports Linux. This needs a packaging/design decision: avoid flowing the Linux-only dependency to non-Linux consumers, or explicitly accept and document that the shared desktop asset carries it.
jsuarezruiz
left a comment
There was a problem hiding this comment.
Could you rebase and fix the conflict? Thanks in advance.
|
CI is currently failing in the ControlGallery NativeAOT publish because The generated XAML code calls
Can you review? |
I added a x:DataType to CollectionView ItemTemplate. |
cedric56
left a comment
There was a problem hiding this comment.
I have added x:DataType="model:AppAction"
✨ Add AppActions support for Avalonia MAUI Essentials (Linux D-Bus integration)
This PR introduces a new AppActions implementation for Avalonia.Controls.Maui.Essentials, enabling Linux desktop integration through D-Bus activation and .desktop file actions.
🚀 Overview
This feature extends MAUI AppActions to support desktop Linux environments when using Avalonia, allowing applications to expose and handle native app shortcuts via:
D-Bus service registration
Dynamic .desktop file generation
Runtime action activation callbacks
✅ Linux Platform Support
Implements PlatformSetAsync for Linux only
Uses OperatingSystem.IsLinux() guard
🔌 D-Bus Integration
Registers a session bus service (com.essentials.AppActions)
Exposes actions via Tmds.DBus
Handles activation through OnAppActionAsync
🖥 Desktop Integration
Generates .desktop files dynamically per app instance
Adds custom Desktop Action entries for each AppAction
Uses gdbus calls to trigger actions externally
🪟 Window Integration
Sets X11 WM_CLASS to support desktop identity binding
Ensures initialization occurs after MainWindow is available