Merge pull request #6416 from duplicati/feature/mac-template-icons
Use macOS template icons
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.6 KiB |
@@ -61,25 +61,25 @@ namespace Duplicati.GUI.TrayIcon
|
||||
|
||||
internal Task RunOnUIThread(Action action)
|
||||
{
|
||||
if (_disposed != 0)
|
||||
return Task.CompletedTask;
|
||||
if (_disposed != 0)
|
||||
return Task.CompletedTask;
|
||||
|
||||
return actionDelayer.ExecuteAction(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_disposed != 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
RunOnUIThreadInternal(action);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteErrorMessage(LOGTAG, "AvaloniaRunOnUIThreadFailed", ex, "Failed to run action on UI thread");
|
||||
throw;
|
||||
}
|
||||
});
|
||||
return actionDelayer.ExecuteAction(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_disposed != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
RunOnUIThreadInternal(action);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteErrorMessage(LOGTAG, "AvaloniaRunOnUIThreadFailed", ex, "Failed to run action on UI thread");
|
||||
throw;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void RunOnUIThreadInternal(Action action)
|
||||
@@ -89,7 +89,7 @@ namespace Duplicati.GUI.TrayIcon
|
||||
return;
|
||||
|
||||
if (_disposed != 0)
|
||||
return ;
|
||||
return;
|
||||
|
||||
if (Dispatcher.UIThread.CheckAccess())
|
||||
action();
|
||||
@@ -340,7 +340,7 @@ namespace Duplicati.GUI.TrayIcon
|
||||
private void UpdateIcon()
|
||||
{
|
||||
if (nativeMenuItem == null)
|
||||
return;
|
||||
return;
|
||||
|
||||
nativeMenuItem.Icon = this.Icon switch
|
||||
{
|
||||
@@ -410,6 +410,7 @@ namespace Duplicati.GUI.TrayIcon
|
||||
if (this.trayIcon == null)
|
||||
return;
|
||||
|
||||
MacOSProperties.SetIsTemplateIcon(this.trayIcon, true);
|
||||
switch (icon)
|
||||
{
|
||||
case TrayIcons.IdleError:
|
||||
@@ -482,7 +483,7 @@ namespace Duplicati.GUI.TrayIcon
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"AVALALONIA desktop.Shutdown() failed because of {ex}");
|
||||
Console.WriteLine($"AVALALONIA desktop.Shutdown() failed because of {ex}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
<TrimmableAssembly Include="Avalonia.Themes.Default" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia" Version="11.3.2" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.2" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.2" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.0" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="Assets\**" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<PackageReference Include="VaultSharp" Version="1.7.0" />
|
||||
<PackageReference Include="Meziantou.Framework.Win32.CredentialManager" Version="1.7.0" />
|
||||
<!-- Important! Avalonia also depends on this package, so make sure the versions are in sync -->
|
||||
<PackageReference Include="Tmds.DBus.Protocol" Version="0.20.0" />
|
||||
<PackageReference Include="Tmds.DBus.Protocol" Version="0.21.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace secrets.DBus
|
||||
private const string __Interface = "org.freedesktop.impl.portal.Secret";
|
||||
public Secret(secretsService service, ObjectPath path) : base(service, path)
|
||||
{ }
|
||||
public Task<(uint Response, Dictionary<string, VariantValue> Results)> RetrieveSecretAsync(ObjectPath handle, string appId, System.Runtime.InteropServices.SafeHandle fd, Dictionary<string, Variant> options)
|
||||
public Task<(uint Response, Dictionary<string, VariantValue> Results)> RetrieveSecretAsync(ObjectPath handle, string appId, System.Runtime.InteropServices.SafeHandle fd, Dictionary<string, VariantValue> options)
|
||||
{
|
||||
return this.Connection.CallMethodAsync(CreateMessage(), (Message m, object? s) => ReadMessage_uaesv(m, (secretsObject)s!), this);
|
||||
MessageBuffer CreateMessage()
|
||||
@@ -187,7 +187,7 @@ namespace secrets.DBus
|
||||
return writer.CreateMessage();
|
||||
}
|
||||
}
|
||||
public Task<ObjectPath> CreateWithMasterPasswordAsync(Dictionary<string, Variant> attributes, (ObjectPath, byte[], byte[], string) master)
|
||||
public Task<ObjectPath> CreateWithMasterPasswordAsync(Dictionary<string, VariantValue> attributes, (ObjectPath, byte[], byte[], string) master)
|
||||
{
|
||||
return this.Connection.CallMethodAsync(CreateMessage(), (Message m, object? s) => ReadMessage_o(m, (secretsObject)s!), this);
|
||||
MessageBuffer CreateMessage()
|
||||
@@ -231,7 +231,7 @@ namespace secrets.DBus
|
||||
private const string __Interface = "org.freedesktop.Secret.Service";
|
||||
public Service(secretsService service, ObjectPath path) : base(service, path)
|
||||
{ }
|
||||
public Task<(VariantValue Output, ObjectPath Result)> OpenSessionAsync(string algorithm, Variant input)
|
||||
public Task<(VariantValue Output, ObjectPath Result)> OpenSessionAsync(string algorithm, VariantValue input)
|
||||
{
|
||||
return this.Connection.CallMethodAsync(CreateMessage(), (Message m, object? s) => ReadMessage_vo(m, (secretsObject)s!), this);
|
||||
MessageBuffer CreateMessage()
|
||||
@@ -248,7 +248,7 @@ namespace secrets.DBus
|
||||
return writer.CreateMessage();
|
||||
}
|
||||
}
|
||||
public Task<(ObjectPath Collection, ObjectPath Prompt)> CreateCollectionAsync(Dictionary<string, Variant> properties, string @alias)
|
||||
public Task<(ObjectPath Collection, ObjectPath Prompt)> CreateCollectionAsync(Dictionary<string, VariantValue> properties, string @alias)
|
||||
{
|
||||
return this.Connection.CallMethodAsync(CreateMessage(), (Message m, object? s) => ReadMessage_oo(m, (secretsObject)s!), this);
|
||||
MessageBuffer CreateMessage()
|
||||
@@ -558,7 +558,7 @@ namespace secrets.DBus
|
||||
return writer.CreateMessage();
|
||||
}
|
||||
}
|
||||
public Task<(ObjectPath Item, ObjectPath Prompt)> CreateItemAsync(Dictionary<string, Variant> properties, (ObjectPath, byte[], byte[], string) secret, bool replace)
|
||||
public Task<(ObjectPath Item, ObjectPath Prompt)> CreateItemAsync(Dictionary<string, VariantValue> properties, (ObjectPath, byte[], byte[], string) secret, bool replace)
|
||||
{
|
||||
return this.Connection.CallMethodAsync(CreateMessage(), (Message m, object? s) => ReadMessage_oo(m, (secretsObject)s!), this);
|
||||
MessageBuffer CreateMessage()
|
||||
|
||||