mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
enhance: update GPG program path after type changed
This commit is contained in:
parent
16b6e90656
commit
1f0c4be625
1 changed files with 14 additions and 0 deletions
|
@ -174,6 +174,20 @@ namespace SourceGit.Views
|
|||
GitVersion = ver;
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
|
||||
if (change.Property == GPGFormatProperty)
|
||||
{
|
||||
var config = new Commands.Config(null).ListAll();
|
||||
if (GPGFormat.Value == "opengpg" && config.TryGetValue("gpg.program", out var opengpg))
|
||||
GPGExecutableFile = opengpg;
|
||||
else if (config.TryGetValue($"gpg.{GPGFormat.Value}.program", out var gpgProgram))
|
||||
GPGExecutableFile = gpgProgram;
|
||||
}
|
||||
}
|
||||
|
||||
private void BeginMoveWindow(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
BeginMoveDrag(e);
|
||||
|
|
Loading…
Reference in a new issue