From 8c0ff1f613dc0acc9a8ba93af93eb8a3ae31f863 Mon Sep 17 00:00:00 2001 From: Gadfly Date: Fri, 21 Jun 2024 16:03:45 +0800 Subject: [PATCH] fix: Save different GPGFormat executable files independently --- src/Models/GPGFormat.cs | 9 ++++----- src/Views/Preference.axaml | 6 ++---- src/Views/Preference.axaml.cs | 28 +++++++++++++++++++++++----- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/Models/GPGFormat.cs b/src/Models/GPGFormat.cs index 0ba4e9e2..bd1858c9 100644 --- a/src/Models/GPGFormat.cs +++ b/src/Models/GPGFormat.cs @@ -2,18 +2,17 @@ namespace SourceGit.Models { - public class GPGFormat(string name, string value, string desc, string program, bool needFindProgram) + public class GPGFormat(string name, string value, string desc, string program) { public string Name { get; set; } = name; public string Value { get; set; } = value; public string Desc { get; set; } = desc; public string Program { get; set; } = program; - public bool NeedFindProgram { get; set; } = needFindProgram; public static readonly List Supported = [ - new GPGFormat("OPENPGP", "openpgp", "DEFAULT", "gpg", true), - new GPGFormat("X.509", "x509", "", "gpgsm", true), - new GPGFormat("SSH", "ssh", "Requires Git >= 2.34.0", "ssh-keygen", false), + new GPGFormat("OPENPGP", "openpgp", "DEFAULT", "gpg"), + new GPGFormat("X.509", "x509", "", "gpgsm"), + new GPGFormat("SSH", "ssh", "Requires Git >= 2.34.0", "ssh-keygen"), ]; } } diff --git a/src/Views/Preference.axaml b/src/Views/Preference.axaml index b84354aa..e1ff4c86 100644 --- a/src/Views/Preference.axaml +++ b/src/Views/Preference.axaml @@ -412,14 +412,12 @@ + Margin="0,0,16,0"/> + Watermark="{DynamicResource Text.Preference.GPG.Path.Placeholder}">