Compare commits

..

No commits in common. "efc14fed36f85e35299bfbb7ff0091b4c5287b79" and "af888e17de6e07660f93cc221dd43f85fe5de11b" have entirely different histories.

37 changed files with 145 additions and 323 deletions

View file

@ -31,7 +31,6 @@ Opensource Git GUI client.
* Revision Diffs * Revision Diffs
* Branch Diff * Branch Diff
* Image Diff - Side-By-Side/Swipe/Blend * Image Diff - Side-By-Side/Swipe/Blend
* Search commits
* GitFlow * GitFlow
* Git LFS * Git LFS
* Issue Link * Issue Link
@ -81,7 +80,6 @@ For **macOS** users:
* Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`. * Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`.
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your mac. * Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your mac.
* You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works. * You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works.
* You may need to start this app from commandline by using `open -a SourceGit` to introduce the `PATH` environment variable from your shell.
For **Linux** users: For **Linux** users:

View file

@ -1 +1 @@
8.34 8.33

View file

@ -188,8 +188,10 @@ namespace SourceGit.Commands
start.Environment.Add("SOURCEGIT_LAUNCH_AS_ASKPASS", "TRUE"); start.Environment.Add("SOURCEGIT_LAUNCH_AS_ASKPASS", "TRUE");
// If an SSH private key was provided, sets the environment. // If an SSH private key was provided, sets the environment.
if (!start.Environment.ContainsKey("GIT_SSH_COMMAND") && !string.IsNullOrEmpty(SSHKey)) if (!string.IsNullOrEmpty(SSHKey))
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}'"); start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new -i '{SSHKey}'");
else
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new");
// Force using en_US.UTF-8 locale to avoid GCM crash // Force using en_US.UTF-8 locale to avoid GCM crash
if (OperatingSystem.IsLinux()) if (OperatingSystem.IsLinux())
@ -197,12 +199,7 @@ namespace SourceGit.Commands
// Fix sometimes `LSEnvironment` not working on macOS // Fix sometimes `LSEnvironment` not working on macOS
if (OperatingSystem.IsMacOS()) if (OperatingSystem.IsMacOS())
{ start.Environment.Add("PATH", "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
if (start.Environment.TryGetValue("PATH", out var path))
start.Environment.Add("PATH", $"/opt/homebrew/bin:/opt/homebrew/sbin:{path}");
else
start.Environment.Add("PATH", "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
}
// Force using this app as git editor. // Force using this app as git editor.
switch (Editor) switch (Editor)

View file

@ -7,23 +7,17 @@ namespace SourceGit.Commands
{ {
public Config(string repository) public Config(string repository)
{ {
if (string.IsNullOrEmpty(repository)) WorkingDirectory = repository;
{ Context = repository;
WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
}
else
{
WorkingDirectory = repository;
Context = repository;
_isLocal = true;
}
RaiseError = false; RaiseError = false;
} }
public Dictionary<string, string> ListAll() public Dictionary<string, string> ListAll()
{ {
Args = "config -l"; if (string.IsNullOrEmpty(WorkingDirectory))
Args = "config --global -l";
else
Args = "config -l";
var output = ReadToEnd(); var output = ReadToEnd();
var rs = new Dictionary<string, string>(); var rs = new Dictionary<string, string>();
@ -53,16 +47,22 @@ namespace SourceGit.Commands
public bool Set(string key, string value, bool allowEmpty = false) public bool Set(string key, string value, bool allowEmpty = false)
{ {
var scope = _isLocal ? "--local" : "--global";
if (!allowEmpty && string.IsNullOrWhiteSpace(value)) if (!allowEmpty && string.IsNullOrWhiteSpace(value))
Args = $"config {scope} --unset {key}"; {
if (string.IsNullOrEmpty(WorkingDirectory))
Args = $"config --global --unset {key}";
else
Args = $"config --unset {key}";
}
else else
Args = $"config {scope} {key} \"{value}\""; {
if (string.IsNullOrWhiteSpace(WorkingDirectory))
Args = $"config --global {key} \"{value}\"";
else
Args = $"config {key} \"{value}\"";
}
return Exec(); return Exec();
} }
private bool _isLocal = false;
} }
} }

View file

@ -32,17 +32,9 @@
return Exec(); return Exec();
} }
public string GetURL(string name, bool isPush) public bool SetURL(string name, string url)
{ {
Args = "remote get-url" + (isPush ? " --push " : " ") + name; Args = $"remote set-url {name} {url}";
var rs = ReadToEnd();
return rs.IsSuccess ? rs.StdOut.Trim() : string.Empty;
}
public bool SetURL(string name, string url, bool isPush)
{
Args = "remote set-url" + (isPush ? " --push " : " ") + $"{name} {url}";
return Exec(); return Exec();
} }
} }

View file

@ -16,7 +16,7 @@ namespace SourceGit.Commands
public static bool Add(string repo, string name, string basedOn, string message, bool sign) public static bool Add(string repo, string name, string basedOn, string message, bool sign)
{ {
var param = sign ? "--sign -a" : "--no-sign -a"; var param = sign ? "-s -a" : "-a";
var cmd = new Command(); var cmd = new Command();
cmd.WorkingDirectory = repo; cmd.WorkingDirectory = repo;
cmd.Context = repo; cmd.Context = repo;

View file

@ -81,8 +81,6 @@ namespace SourceGit.Models
public class RegistryOptionsWrapper(ThemeName defaultTheme) : IRegistryOptions public class RegistryOptionsWrapper(ThemeName defaultTheme) : IRegistryOptions
{ {
public string LastScope { get; set; } = string.Empty;
public IRawTheme GetTheme(string scopeName) => _backend.GetTheme(scopeName); public IRawTheme GetTheme(string scopeName) => _backend.GetTheme(scopeName);
public IRawTheme GetDefaultTheme() => _backend.GetDefaultTheme(); public IRawTheme GetDefaultTheme() => _backend.GetDefaultTheme();
public IRawTheme LoadTheme(ThemeName name) => _backend.LoadTheme(name); public IRawTheme LoadTheme(ThemeName name) => _backend.LoadTheme(name);
@ -113,15 +111,10 @@ namespace SourceGit.Models
public static void SetGrammarByFileName(TextMate.Installation installation, string filePath) public static void SetGrammarByFileName(TextMate.Installation installation, string filePath)
{ {
if (installation is { RegistryOptions: RegistryOptionsWrapper reg } && !string.IsNullOrEmpty(filePath)) if (installation is { RegistryOptions: RegistryOptionsWrapper reg })
{ {
var scope = reg.GetScope(filePath); installation.SetGrammar(reg.GetScope(filePath));
if (reg.LastScope != scope) GC.Collect();
{
reg.LastScope = scope;
installation.SetGrammar(reg.GetScope(filePath));
GC.Collect();
}
} }
} }
} }

View file

@ -141,7 +141,6 @@
<x:String x:Key="Text.Configure.Git" xml:space="preserve">GIT</x:String> <x:String x:Key="Text.Configure.Git" xml:space="preserve">GIT</x:String>
<x:String x:Key="Text.Configure.Git.AutoFetch" xml:space="preserve">Remotes automatisch fetchen</x:String> <x:String x:Key="Text.Configure.Git.AutoFetch" xml:space="preserve">Remotes automatisch fetchen</x:String>
<x:String x:Key="Text.Configure.Git.AutoFetchIntervalSuffix" xml:space="preserve">Minute(n)</x:String> <x:String x:Key="Text.Configure.Git.AutoFetchIntervalSuffix" xml:space="preserve">Minute(n)</x:String>
<x:String x:Key="Text.Configure.Git.DefaultRemote" xml:space="preserve">Standard Remote</x:String>
<x:String x:Key="Text.Configure.IssueTracker" xml:space="preserve">TICKETSYSTEM</x:String> <x:String x:Key="Text.Configure.IssueTracker" xml:space="preserve">TICKETSYSTEM</x:String>
<x:String x:Key="Text.Configure.IssueTracker.AddSampleGithub" xml:space="preserve">Beispiel für Github-Regel hinzufügen</x:String> <x:String x:Key="Text.Configure.IssueTracker.AddSampleGithub" xml:space="preserve">Beispiel für Github-Regel hinzufügen</x:String>
<x:String x:Key="Text.Configure.IssueTracker.AddSampleJira" xml:space="preserve">Beispiel für Jira-Regel hinzufügen</x:String> <x:String x:Key="Text.Configure.IssueTracker.AddSampleJira" xml:space="preserve">Beispiel für Jira-Regel hinzufügen</x:String>
@ -207,7 +206,6 @@
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">ALT</x:String> <x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">ALT</x:String>
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">Kopieren</x:String> <x:String x:Key="Text.Diff.Copy" xml:space="preserve">Kopieren</x:String>
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">Dateimodus geändert</x:String> <x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">Dateimodus geändert</x:String>
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">Ignoriere Leerzeichenänderungen</x:String>
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJEKT ÄNDERUNG</x:String> <x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJEKT ÄNDERUNG</x:String>
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Nächste Änderung</x:String> <x:String x:Key="Text.Diff.Next" xml:space="preserve">Nächste Änderung</x:String>
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN</x:String> <x:String x:Key="Text.Diff.NoChange" xml:space="preserve">KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN</x:String>
@ -227,7 +225,6 @@
<x:String x:Key="Text.Discard" xml:space="preserve">Änderungen verwerfen</x:String> <x:String x:Key="Text.Discard" xml:space="preserve">Änderungen verwerfen</x:String>
<x:String x:Key="Text.Discard.All" xml:space="preserve">Alle Änderungen in der Arbeitskopie.</x:String> <x:String x:Key="Text.Discard.All" xml:space="preserve">Alle Änderungen in der Arbeitskopie.</x:String>
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Änderungen:</x:String> <x:String x:Key="Text.Discard.Changes" xml:space="preserve">Änderungen:</x:String>
<x:String x:Key="Text.Discard.IncludeIgnored" xml:space="preserve">Ignorierte Dateien inkludieren</x:String>
<x:String x:Key="Text.Discard.Total" xml:space="preserve">Insgesamt {0} Änderungen werden verworfen</x:String> <x:String x:Key="Text.Discard.Total" xml:space="preserve">Insgesamt {0} Änderungen werden verworfen</x:String>
<x:String x:Key="Text.Discard.Warning" xml:space="preserve">Du kannst das nicht rückgängig machen!!!</x:String> <x:String x:Key="Text.Discard.Warning" xml:space="preserve">Du kannst das nicht rückgängig machen!!!</x:String>
<x:String x:Key="Text.EditRepositoryNode.Bookmark" xml:space="preserve">Lesezeichen:</x:String> <x:String x:Key="Text.EditRepositoryNode.Bookmark" xml:space="preserve">Lesezeichen:</x:String>
@ -333,7 +330,6 @@
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String> <x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Gestagte Änderungen committen</x:String> <x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Gestagte Änderungen committen</x:String>
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Gestagte Änderungen committen und pushen</x:String> <x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Gestagte Änderungen committen und pushen</x:String>
<x:String x:Key="Text.Hotkeys.Repo.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
<x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Ausgewählte Änderungen verwerfen</x:String> <x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Ausgewählte Änderungen verwerfen</x:String>
<x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Dashboard Modus (Standard)</x:String> <x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Dashboard Modus (Standard)</x:String>
<x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Erzwinge Neuladen des Repositorys</x:String> <x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Erzwinge Neuladen des Repositorys</x:String>
@ -359,6 +355,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interaktiver Rebase</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interaktiver Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ziel Branch:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ziel Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Auf:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Auf:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Hochschieben</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Runterschieben</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">FEHLER</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">FEHLER</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">INFO</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">INFO</x:String>
@ -501,7 +499,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Repository Einstellungen</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">Repository Einstellungen</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">WEITER</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">WEITER</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Öffne im Datei-Browser</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">Öffne im Datei-Browser</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches/Tags/Submodule</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches &amp; Tags &amp; Submodule</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">GEFILTERT:</x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">GEFILTERT:</x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOKALE BRANCHES</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOKALE BRANCHES</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Zum HEAD wechseln</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Zum HEAD wechseln</x:String>
@ -518,7 +516,6 @@
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String> <x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>
<x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String> <x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String>
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Autor &amp; Committer</x:String> <x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Autor &amp; Committer</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Aktueller Branch</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Zeige Tags als Baum</x:String> <x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Zeige Tags als Baum</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistiken</x:String> <x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistiken</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULE</x:String> <x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULE</x:String>
@ -626,8 +623,6 @@
<x:String x:Key="Text.WorkingCopy.Commit" xml:space="preserve">COMMIT</x:String> <x:String x:Key="Text.WorkingCopy.Commit" xml:space="preserve">COMMIT</x:String>
<x:String x:Key="Text.WorkingCopy.CommitAndPush" xml:space="preserve">COMMIT &amp; PUSH</x:String> <x:String x:Key="Text.WorkingCopy.CommitAndPush" xml:space="preserve">COMMIT &amp; PUSH</x:String>
<x:String x:Key="Text.WorkingCopy.CommitMessageHelper" xml:space="preserve">Template/Historie</x:String> <x:String x:Key="Text.WorkingCopy.CommitMessageHelper" xml:space="preserve">Template/Historie</x:String>
<x:String x:Key="Text.WorkingCopy.CommitTip" xml:space="preserve">Klick-Ereignis auslösen</x:String>
<x:String x:Key="Text.WorkingCopy.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
<x:String x:Key="Text.WorkingCopy.Conflicts" xml:space="preserve">KONFLIKTE ERKANNT</x:String> <x:String x:Key="Text.WorkingCopy.Conflicts" xml:space="preserve">KONFLIKTE ERKANNT</x:String>
<x:String x:Key="Text.WorkingCopy.Conflicts.Resolved" xml:space="preserve">DATEI KONFLIKTE GELÖST</x:String> <x:String x:Key="Text.WorkingCopy.Conflicts.Resolved" xml:space="preserve">DATEI KONFLIKTE GELÖST</x:String>
<x:String x:Key="Text.WorkingCopy.IncludeUntracked" xml:space="preserve">NICHT-VERFOLGTE DATEIEN INKLUDIEREN</x:String> <x:String x:Key="Text.WorkingCopy.IncludeUntracked" xml:space="preserve">NICHT-VERFOLGTE DATEIEN INKLUDIEREN</x:String>

View file

@ -2,7 +2,6 @@
<x:String x:Key="Text.About" xml:space="preserve">About</x:String> <x:String x:Key="Text.About" xml:space="preserve">About</x:String>
<x:String x:Key="Text.About.Menu" xml:space="preserve">About SourceGit</x:String> <x:String x:Key="Text.About.Menu" xml:space="preserve">About SourceGit</x:String>
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Build with </x:String> <x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Build with </x:String>
<x:String x:Key="Text.About.Chart" xml:space="preserve">• Chart is rendered by </x:String>
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String> <x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
<x:String x:Key="Text.About.Editor" xml:space="preserve">• TextEditor from </x:String> <x:String x:Key="Text.About.Editor" xml:space="preserve">• TextEditor from </x:String>
<x:String x:Key="Text.About.Fonts" xml:space="preserve">• Monospace fonts come from </x:String> <x:String x:Key="Text.About.Fonts" xml:space="preserve">• Monospace fonts come from </x:String>
@ -314,7 +313,6 @@
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Switch Horizontal/Vertical Layout</x:String> <x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Switch Horizontal/Vertical Layout</x:String>
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Switch Curve/Polyline Graph Mode</x:String> <x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Switch Curve/Polyline Graph Mode</x:String>
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTHOR</x:String> <x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTHOR</x:String>
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">AUTHOR TIME</x:String>
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPH &amp; SUBJECT</x:String> <x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPH &amp; SUBJECT</x:String>
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String> <x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">COMMIT TIME</x:String> <x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">COMMIT TIME</x:String>
@ -358,6 +356,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Move Up</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Move Down</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String>
@ -414,7 +414,6 @@
<x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">Check for updates on startup</x:String> <x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">Check for updates on startup</x:String>
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Language</x:String> <x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Language</x:String>
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">History Commits</x:String> <x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">History Commits</x:String>
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">Show author time intead of commit time in graph</x:String>
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Subject Guide Length</x:String> <x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Subject Guide Length</x:String>
<x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String> <x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String>
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Enable Auto CRLF</x:String> <x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Enable Auto CRLF</x:String>
@ -501,7 +500,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open In File Browser</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open In File Browser</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches &amp; Tags &amp; Submodules</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
@ -563,8 +562,6 @@
<x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">Include untracked files</x:String> <x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">Include untracked files</x:String>
<x:String x:Key="Text.Stash.Message" xml:space="preserve">Message:</x:String> <x:String x:Key="Text.Stash.Message" xml:space="preserve">Message:</x:String>
<x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">Optional. Name of this stash</x:String> <x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">Optional. Name of this stash</x:String>
<x:String x:Key="Text.Stash.OnlyStagedChanges" xml:space="preserve">Only staged changes</x:String>
<x:String x:Key="Text.Stash.TipForSelectedFiles" xml:space="preserve">Both staged and unstaged changes of selected file(s) will be stashed!!!</x:String>
<x:String x:Key="Text.Stash.Title" xml:space="preserve">Stash Local Changes</x:String> <x:String x:Key="Text.Stash.Title" xml:space="preserve">Stash Local Changes</x:String>
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">Apply</x:String> <x:String x:Key="Text.StashCM.Apply" xml:space="preserve">Apply</x:String>
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">Drop</x:String> <x:String x:Key="Text.StashCM.Drop" xml:space="preserve">Drop</x:String>

View file

@ -2,6 +2,7 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://SourceGit/Resources/Locales/en_US.axaml"/> <ResourceInclude Source="avares://SourceGit/Resources/Locales/en_US.axaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<x:String x:Key="Text.About" xml:space="preserve">À propos</x:String> <x:String x:Key="Text.About" xml:space="preserve">À propos</x:String>
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Compilé avec </x:String> <x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Compilé avec </x:String>
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String> <x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
@ -345,6 +346,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Move Up</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Move Down</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String>
@ -476,7 +479,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Ouvrir dans l'explorateur Windows</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">Ouvrir dans l'explorateur Windows</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches &amp; Tags &amp; Submodules</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>

View file

@ -340,6 +340,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interativo</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interativo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ramo Alvo:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ramo Alvo:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Em:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Em:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Mover Para Cima</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Mover Para Baixo</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERRO</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERRO</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">AVISO</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">AVISO</x:String>
@ -469,7 +471,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configurar este repositório</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configurar este repositório</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUAR</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUAR</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Abrir no Navegador de Arquivos</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">Abrir no Navegador de Arquivos</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Pesquisar Branches/Tags/Submódulos</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">Pesquisar Branches &amp; Tags &amp; Submódulos</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTRADO POR:</x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTRADO POR:</x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">BRANCHES LOCAIS</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">BRANCHES LOCAIS</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navegar para HEAD</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navegar para HEAD</x:String>

View file

@ -5,7 +5,6 @@
<x:String x:Key="Text.About" xml:space="preserve">О программе</x:String> <x:String x:Key="Text.About" xml:space="preserve">О программе</x:String>
<x:String x:Key="Text.About.Menu" xml:space="preserve">О SourceGit</x:String> <x:String x:Key="Text.About.Menu" xml:space="preserve">О SourceGit</x:String>
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Сборка с </x:String> <x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Сборка с </x:String>
<x:String x:Key="Text.About.Chart" xml:space="preserve">• Диаграмма отображается с помощью</x:String>
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String> <x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
<x:String x:Key="Text.About.Editor" xml:space="preserve">• Текстовый редактор от </x:String> <x:String x:Key="Text.About.Editor" xml:space="preserve">• Текстовый редактор от </x:String>
<x:String x:Key="Text.About.Fonts" xml:space="preserve">• Моноширинные шрифты взяты из </x:String> <x:String x:Key="Text.About.Fonts" xml:space="preserve">• Моноширинные шрифты взяты из </x:String>
@ -317,7 +316,6 @@
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Переключение горизонтального/вертикального расположения</x:String> <x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Переключение горизонтального/вертикального расположения</x:String>
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Переключение режима построения кривой/полилинии</x:String> <x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Переключение режима построения кривой/полилинии</x:String>
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">АВТОР</x:String> <x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">АВТОР</x:String>
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">ВРЕМЯ АВТОРА</x:String>
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">ГРАФ И СУБЪЕКТ</x:String> <x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">ГРАФ И СУБЪЕКТ</x:String>
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String> <x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">ВРЕМЯ ФИКСАЦИИ</x:String> <x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">ВРЕМЯ ФИКСАЦИИ</x:String>
@ -361,6 +359,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Интерактивное перемещение</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Интерактивное перемещение</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Целевая ветка:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Целевая ветка:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">На:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">На:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Вверх</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Вниз</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ОШИБКА</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">ОШИБКА</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">УВЕДОМЛЕНИЕ</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">УВЕДОМЛЕНИЕ</x:String>
@ -417,7 +417,6 @@
<x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">Проверить обновления при старте</x:String> <x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">Проверить обновления при старте</x:String>
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Язык</x:String> <x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Язык</x:String>
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">История фиксаций</x:String> <x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">История фиксаций</x:String>
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">Показать время автора вместо времени фиксации на графике</x:String>
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Длина темы фиксации</x:String> <x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Длина темы фиксации</x:String>
<x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String> <x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String>
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Включить автозавершение CRLF</x:String> <x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Включить автозавершение CRLF</x:String>
@ -561,8 +560,6 @@
<x:String x:Key="Text.Squash.Into" xml:space="preserve">В:</x:String> <x:String x:Key="Text.Squash.Into" xml:space="preserve">В:</x:String>
<x:String x:Key="Text.SSHKey" xml:space="preserve">Частный ключ SSH:</x:String> <x:String x:Key="Text.SSHKey" xml:space="preserve">Частный ключ SSH:</x:String>
<x:String x:Key="Text.SSHKey.Placeholder" xml:space="preserve">Путь хранения частного ключа SSH</x:String> <x:String x:Key="Text.SSHKey.Placeholder" xml:space="preserve">Путь хранения частного ключа SSH</x:String>
<x:String x:Key="Text.Stash.OnlyStagedChanges" xml:space="preserve">Только подготовленные изменения</x:String>
<x:String x:Key="Text.Stash.TipForSelectedFiles" xml:space="preserve">Подготовленные так и подготовленные изменения выбранных файлов будут сохранены!!!</x:String>
<x:String x:Key="Text.Start" xml:space="preserve">ЗАПУСК</x:String> <x:String x:Key="Text.Start" xml:space="preserve">ЗАПУСК</x:String>
<x:String x:Key="Text.Stash" xml:space="preserve">Отложить</x:String> <x:String x:Key="Text.Stash" xml:space="preserve">Отложить</x:String>
<x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">Включить неотслеживаемые файлы</x:String> <x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">Включить неотслеживаемые файлы</x:String>

View file

@ -5,7 +5,6 @@
<x:String x:Key="Text.About" xml:space="preserve">关于软件</x:String> <x:String x:Key="Text.About" xml:space="preserve">关于软件</x:String>
<x:String x:Key="Text.About.Menu" xml:space="preserve">关于本软件</x:String> <x:String x:Key="Text.About.Menu" xml:space="preserve">关于本软件</x:String>
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• 项目依赖于 </x:String> <x:String x:Key="Text.About.BuildWith" xml:space="preserve">• 项目依赖于 </x:String>
<x:String x:Key="Text.About.Chart" xml:space="preserve">• 图表绘制组件来自 </x:String>
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String> <x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
<x:String x:Key="Text.About.Editor" xml:space="preserve">• 文本编辑器使用 </x:String> <x:String x:Key="Text.About.Editor" xml:space="preserve">• 文本编辑器使用 </x:String>
<x:String x:Key="Text.About.Fonts" xml:space="preserve">• 等宽字体来自于 </x:String> <x:String x:Key="Text.About.Fonts" xml:space="preserve">• 等宽字体来自于 </x:String>
@ -317,7 +316,6 @@
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切换横向/纵向显示</x:String> <x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切换横向/纵向显示</x:String>
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切换曲线/折线显示</x:String> <x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切换曲线/折线显示</x:String>
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String> <x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String>
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">修改时间</x:String>
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路线图与主题</x:String> <x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路线图与主题</x:String>
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交指纹</x:String> <x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交指纹</x:String>
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交时间</x:String> <x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交时间</x:String>
@ -361,6 +359,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">交互式变基</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">交互式变基</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目标分支 </x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目标分支 </x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交 </x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交 </x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">向上移动</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">向下移动</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">出错了</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">出错了</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">系统提示</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">系统提示</x:String>
@ -413,7 +413,6 @@
<x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">启动时检测软件更新</x:String> <x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">启动时检测软件更新</x:String>
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">显示语言</x:String> <x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">显示语言</x:String>
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">最大历史提交数</x:String> <x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">最大历史提交数</x:String>
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">在提交路线图中显示修改时间而非提交时间</x:String>
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">SUBJECT字数检测</x:String> <x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">SUBJECT字数检测</x:String>
<x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT配置</x:String> <x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT配置</x:String>
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">自动换行转换</x:String> <x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">自动换行转换</x:String>
@ -499,7 +498,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">配置本仓库</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">配置本仓库</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支/标签/子模块</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支、标签、子模块</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">过滤规则 </x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">过滤规则 </x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本地分支</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本地分支</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">定位HEAD</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">定位HEAD</x:String>
@ -561,8 +560,6 @@
<x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">包含未跟踪的文件</x:String> <x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">包含未跟踪的文件</x:String>
<x:String x:Key="Text.Stash.Message" xml:space="preserve">信息 </x:String> <x:String x:Key="Text.Stash.Message" xml:space="preserve">信息 </x:String>
<x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">选填,用于命名此贮藏</x:String> <x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">选填,用于命名此贮藏</x:String>
<x:String x:Key="Text.Stash.OnlyStagedChanges" xml:space="preserve">仅贮藏暂存区的变更</x:String>
<x:String x:Key="Text.Stash.TipForSelectedFiles" xml:space="preserve">选中文件的所有变更均会被贮藏!</x:String>
<x:String x:Key="Text.Stash.Title" xml:space="preserve">贮藏本地变更</x:String> <x:String x:Key="Text.Stash.Title" xml:space="preserve">贮藏本地变更</x:String>
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">应用(apply)</x:String> <x:String x:Key="Text.StashCM.Apply" xml:space="preserve">应用(apply)</x:String>
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">删除(drop)</x:String> <x:String x:Key="Text.StashCM.Drop" xml:space="preserve">删除(drop)</x:String>

View file

@ -5,7 +5,6 @@
<x:String x:Key="Text.About" xml:space="preserve">關於</x:String> <x:String x:Key="Text.About" xml:space="preserve">關於</x:String>
<x:String x:Key="Text.About.Menu" xml:space="preserve">關於 SourceGit</x:String> <x:String x:Key="Text.About.Menu" xml:space="preserve">關於 SourceGit</x:String>
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• 專案依賴於 </x:String> <x:String x:Key="Text.About.BuildWith" xml:space="preserve">• 專案依賴於 </x:String>
<x:String x:Key="Text.About.Chart" xml:space="preserve">• 圖表繪製元件來自 </x:String>
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String> <x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
<x:String x:Key="Text.About.Editor" xml:space="preserve">• 文字編輯器使用 </x:String> <x:String x:Key="Text.About.Editor" xml:space="preserve">• 文字編輯器使用 </x:String>
<x:String x:Key="Text.About.Fonts" xml:space="preserve">• 等寬字型來自於 </x:String> <x:String x:Key="Text.About.Fonts" xml:space="preserve">• 等寬字型來自於 </x:String>
@ -317,7 +316,6 @@
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切換橫向/縱向顯示</x:String> <x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切換橫向/縱向顯示</x:String>
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切換曲線/折線顯示</x:String> <x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切換曲線/折線顯示</x:String>
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String> <x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String>
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">修改時間</x:String>
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路線圖與訊息標題</x:String> <x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路線圖與訊息標題</x:String>
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交編號</x:String> <x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交編號</x:String>
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交時間</x:String> <x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交時間</x:String>
@ -361,6 +359,8 @@
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">互動式重定基底</x:String> <x:String x:Key="Text.InteractiveRebase" xml:space="preserve">互動式重定基底</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目標分支:</x:String> <x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目標分支:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交:</x:String> <x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交:</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">向上移動</x:String>
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">向下移動</x:String>
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String> <x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">發生錯誤</x:String> <x:String x:Key="Text.Launcher.Error" xml:space="preserve">發生錯誤</x:String>
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">系統提示</x:String> <x:String x:Key="Text.Launcher.Info" xml:space="preserve">系統提示</x:String>
@ -417,7 +417,6 @@
<x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">啟動時檢查軟體更新</x:String> <x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">啟動時檢查軟體更新</x:String>
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">顯示語言</x:String> <x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">顯示語言</x:String>
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">最大歷史提交數</x:String> <x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">最大歷史提交數</x:String>
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">在提交路線圖中顯示修改時間而非提交時間</x:String>
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">提交標題字數偵測</x:String> <x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">提交標題字數偵測</x:String>
<x:String x:Key="Text.Preference.Git" xml:space="preserve">Git 設定</x:String> <x:String x:Key="Text.Preference.Git" xml:space="preserve">Git 設定</x:String>
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">自動換行轉換</x:String> <x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">自動換行轉換</x:String>
@ -504,7 +503,7 @@
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">設定本存放庫</x:String> <x:String x:Key="Text.Repository.Configure" xml:space="preserve">設定本存放庫</x:String>
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String> <x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String> <x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支/標籤/子模組</x:String> <x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支、標籤、子模組</x:String>
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">篩選規則:</x:String> <x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">篩選規則:</x:String>
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本機分支</x:String> <x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本機分支</x:String>
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">回到 HEAD</x:String> <x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">回到 HEAD</x:String>
@ -566,8 +565,6 @@
<x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">包含未追蹤的檔案</x:String> <x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">包含未追蹤的檔案</x:String>
<x:String x:Key="Text.Stash.Message" xml:space="preserve">擱置變更訊息:</x:String> <x:String x:Key="Text.Stash.Message" xml:space="preserve">擱置變更訊息:</x:String>
<x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">選填,用於命名此擱置變更</x:String> <x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">選填,用於命名此擱置變更</x:String>
<x:String x:Key="Text.Stash.OnlyStagedChanges" xml:space="preserve">僅擱置已暫存的變更</x:String>
<x:String x:Key="Text.Stash.TipForSelectedFiles" xml:space="preserve">選中檔案的所有變更均會被擱置!</x:String>
<x:String x:Key="Text.Stash.Title" xml:space="preserve">擱置本機變更</x:String> <x:String x:Key="Text.Stash.Title" xml:space="preserve">擱置本機變更</x:String>
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">套用 (apply)</x:String> <x:String x:Key="Text.StashCM.Apply" xml:space="preserve">套用 (apply)</x:String>
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">刪除 (drop)</x:String> <x:String x:Key="Text.StashCM.Drop" xml:space="preserve">刪除 (drop)</x:String>

View file

@ -1,5 +1,4 @@
using System; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SourceGit.ViewModels namespace SourceGit.ViewModels
@ -51,7 +50,6 @@ namespace SourceGit.ViewModels
_basedOn = branch.Head; _basedOn = branch.Head;
BasedOn = branch; BasedOn = branch;
SignTag = new Commands.Config(repo.FullPath).Get("tag.gpgsign").Equals("true", StringComparison.OrdinalIgnoreCase);
View = new Views.CreateTag() { DataContext = this }; View = new Views.CreateTag() { DataContext = this };
} }
@ -61,7 +59,6 @@ namespace SourceGit.ViewModels
_basedOn = commit.SHA; _basedOn = commit.SHA;
BasedOn = commit; BasedOn = commit;
SignTag = new Commands.Config(repo.FullPath).Get("tag.gpgsign").Equals("true", StringComparison.OrdinalIgnoreCase);
View = new Views.CreateTag() { DataContext = this }; View = new Views.CreateTag() { DataContext = this };
} }

View file

@ -118,15 +118,11 @@ namespace SourceGit.ViewModels
if (_remote.URL != _url) if (_remote.URL != _url)
{ {
var succ = new Commands.Remote(_repo.FullPath).SetURL(_name, _url, false); var succ = new Commands.Remote(_repo.FullPath).SetURL(_name, _url);
if (succ) if (succ)
_remote.URL = _url; _remote.URL = _url;
} }
var pushURL = new Commands.Remote(_repo.FullPath).GetURL(_name, true);
if (pushURL != _url)
new Commands.Remote(_repo.FullPath).SetURL(_name, _url, true);
SetProgressDescription("Post processing ..."); SetProgressDescription("Post processing ...");
new Commands.Config(_repo.FullPath).Set($"remote.{_name}.sshkey", _useSSH ? SSHKey : null); new Commands.Config(_repo.FullPath).Set($"remote.{_name}.sshkey", _useSSH ? SSHKey : null);

View file

@ -153,11 +153,7 @@ namespace SourceGit.ViewModels
else if (commits.Count == 1) else if (commits.Count == 1)
{ {
var commit = commits[0] as Models.Commit; var commit = commits[0] as Models.Commit;
_repo.SearchResultSelectedCommit = commit;
if (_repo.SearchResultSelectedCommit == null || _repo.SearchResultSelectedCommit.SHA != commit.SHA)
{
_repo.SearchResultSelectedCommit = _repo.SearchedCommits.Find(x => x.SHA == commit.SHA);
}
AutoSelectedCommit = commit; AutoSelectedCommit = commit;
NavigationId = _navigationId + 1; NavigationId = _navigationId + 1;

View file

@ -140,7 +140,6 @@ namespace SourceGit.ViewModels
var prev = Items[idx - 1]; var prev = Items[idx - 1];
Items.RemoveAt(idx - 1); Items.RemoveAt(idx - 1);
Items.Insert(idx, prev); Items.Insert(idx, prev);
SelectedItem = item;
} }
} }
@ -152,7 +151,6 @@ namespace SourceGit.ViewModels
var next = Items[idx + 1]; var next = Items[idx + 1];
Items.RemoveAt(idx + 1); Items.RemoveAt(idx + 1);
Items.Insert(idx, next); Items.Insert(idx, next);
SelectedItem = item;
} }
} }

View file

@ -465,15 +465,6 @@ namespace SourceGit.ViewModels
private void SwitchWorkspace(Workspace to) private void SwitchWorkspace(Workspace to)
{ {
foreach (var one in Pages)
{
if (one.IsInProgress())
{
App.RaiseException(null, "You have unfinished task(s) in opened pages. Please wait!!!");
return;
}
}
_ignoreIndexChange = true; _ignoreIndexChange = true;
var pref = Preference.Instance; var pref = Preference.Instance;

View file

@ -15,17 +15,16 @@ namespace SourceGit.ViewModels
{ {
get get
{ {
if (_instance != null) if (_instance == null)
return _instance; {
_isLoading = true;
_isLoading = true; _instance = Load();
_instance = Load(); _isLoading = false;
_isLoading = false; }
_instance.PrepareGit(); _instance.PrepareGit();
_instance.PrepareShellOrTerminal(); _instance.PrepareShellOrTerminal();
_instance.PrepareWorkspaces(); _instance.PrepareWorkspaces();
return _instance; return _instance;
} }
} }
@ -132,12 +131,6 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _check4UpdatesOnStartup, value); set => SetProperty(ref _check4UpdatesOnStartup, value);
} }
public bool ShowAuthorTimeInGraph
{
get => _showAuthorTimeInGraph;
set => SetProperty(ref _showAuthorTimeInGraph, value);
}
public string IgnoreUpdateTag public string IgnoreUpdateTag
{ {
get => _ignoreUpdateTag; get => _ignoreUpdateTag;
@ -583,7 +576,6 @@ namespace SourceGit.ViewModels
private int _maxHistoryCommits = 20000; private int _maxHistoryCommits = 20000;
private int _subjectGuideLength = 50; private int _subjectGuideLength = 50;
private bool _useFixedTabWidth = true; private bool _useFixedTabWidth = true;
private bool _showAuthorTimeInGraph = false;
private bool _check4UpdatesOnStartup = true; private bool _check4UpdatesOnStartup = true;
private double _lastCheckUpdateTime = 0; private double _lastCheckUpdateTime = 0;

View file

@ -213,12 +213,7 @@ namespace SourceGit.ViewModels
public bool OnlySearchCommitsInCurrentBranch public bool OnlySearchCommitsInCurrentBranch
{ {
get => _onlySearchCommitsInCurrentBranch; get => _onlySearchCommitsInCurrentBranch;
set set => SetProperty(ref _onlySearchCommitsInCurrentBranch, value);
{
if (SetProperty(ref _onlySearchCommitsInCurrentBranch, value) &&
!string.IsNullOrEmpty(_searchCommitFilter))
StartSearchCommits();
}
} }
public int SearchCommitFilterType public int SearchCommitFilterType
@ -227,12 +222,7 @@ namespace SourceGit.ViewModels
set set
{ {
if (SetProperty(ref _searchCommitFilterType, value)) if (SetProperty(ref _searchCommitFilterType, value))
{
UpdateCurrentRevisionFilesForSearchSuggestion(); UpdateCurrentRevisionFilesForSearchSuggestion();
if (!string.IsNullOrEmpty(_searchCommitFilter))
StartSearchCommits();
}
} }
} }

View file

@ -27,7 +27,7 @@ namespace SourceGit.ViewModels
_repo = repo; _repo = repo;
Current = current; Current = current;
To = to; To = to;
SelectedMode = Models.ResetMode.Supported[1]; SelectedMode = Models.ResetMode.Supported[0];
View = new Views.Reset() { DataContext = this }; View = new Views.Reset() { DataContext = this };
} }

View file

@ -11,7 +11,7 @@ namespace SourceGit.ViewModels
set; set;
} }
public bool HasSelectedFiles public bool CanIgnoreUntracked
{ {
get; get;
} }
@ -22,28 +22,21 @@ namespace SourceGit.ViewModels
set; set;
} }
public bool OnlyStaged public StashChanges(Repository repo, List<Models.Change> changes, bool onlyStaged, bool canIgnoreUntracked)
{
get;
set;
}
public StashChanges(Repository repo, List<Models.Change> changes, bool hasSelectedFiles)
{ {
_repo = repo; _repo = repo;
_changes = changes; _changes = changes;
_onlyStaged = onlyStaged;
HasSelectedFiles = hasSelectedFiles; CanIgnoreUntracked = canIgnoreUntracked;
IncludeUntracked = true; IncludeUntracked = true;
OnlyStaged = false;
View = new Views.StashChanges() { DataContext = this }; View = new Views.StashChanges() { DataContext = this };
} }
public override Task<bool> Sure() public override Task<bool> Sure()
{ {
var jobs = _changes; var jobs = _changes;
if (!HasSelectedFiles && !IncludeUntracked) if (CanIgnoreUntracked && !IncludeUntracked)
{ {
jobs = new List<Models.Change>(); jobs = new List<Models.Change>();
foreach (var job in _changes) foreach (var job in _changes)
@ -63,7 +56,7 @@ namespace SourceGit.ViewModels
return Task.Run(() => return Task.Run(() =>
{ {
var succ = new Commands.Stash(_repo.FullPath).Push(jobs, Message, !HasSelectedFiles && OnlyStaged); var succ = new Commands.Stash(_repo.FullPath).Push(jobs, Message, _onlyStaged);
CallUIThread(() => CallUIThread(() =>
{ {
_repo.MarkWorkingCopyDirtyManually(); _repo.MarkWorkingCopyDirtyManually();
@ -75,5 +68,6 @@ namespace SourceGit.ViewModels
private readonly Repository _repo = null; private readonly Repository _repo = null;
private readonly List<Models.Change> _changes = null; private readonly List<Models.Change> _changes = null;
private readonly bool _onlyStaged = false;
} }
} }

View file

@ -318,9 +318,9 @@ namespace SourceGit.ViewModels
return; return;
if (autoStart) if (autoStart)
PopupHost.ShowAndStartPopup(new StashChanges(_repo, _cached, false)); PopupHost.ShowAndStartPopup(new StashChanges(_repo, _cached, false, true));
else else
PopupHost.ShowPopup(new StashChanges(_repo, _cached, false)); PopupHost.ShowPopup(new StashChanges(_repo, _cached, false, true));
} }
public void StageSelected(Models.Change next) public void StageSelected(Models.Change next)
@ -523,8 +523,9 @@ namespace SourceGit.ViewModels
stash.Click += (_, e) => stash.Click += (_, e) =>
{ {
if (PopupHost.CanCreatePopup()) if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new StashChanges(_repo, _selectedUnstaged, true)); {
PopupHost.ShowPopup(new StashChanges(_repo, _selectedUnstaged, false, false));
}
e.Handled = true; e.Handled = true;
}; };
@ -842,7 +843,7 @@ namespace SourceGit.ViewModels
stash.Click += (_, e) => stash.Click += (_, e) =>
{ {
if (PopupHost.CanCreatePopup()) if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new StashChanges(_repo, _selectedUnstaged, true)); PopupHost.ShowPopup(new StashChanges(_repo, _selectedUnstaged, false, false));
e.Handled = true; e.Handled = true;
}; };
@ -927,7 +928,7 @@ namespace SourceGit.ViewModels
stash.Click += (_, e) => stash.Click += (_, e) =>
{ {
if (PopupHost.CanCreatePopup()) if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new StashChanges(_repo, _selectedStaged, true)); PopupHost.ShowPopup(new StashChanges(_repo, _selectedStaged, true, false));
e.Handled = true; e.Handled = true;
}; };
@ -1096,7 +1097,7 @@ namespace SourceGit.ViewModels
stash.Click += (_, e) => stash.Click += (_, e) =>
{ {
if (PopupHost.CanCreatePopup()) if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new StashChanges(_repo, _selectedStaged, true)); PopupHost.ShowPopup(new StashChanges(_repo, _selectedStaged, true, false));
e.Handled = true; e.Handled = true;
}; };

View file

@ -49,7 +49,7 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,8,32,16"> <StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,8,32,8">
<StackPanel Height="48" Orientation="Horizontal"> <StackPanel Height="48" Orientation="Horizontal">
<TextBlock Classes="bold" Text="SourceGit" FontSize="32" /> <TextBlock Classes="bold" Text="SourceGit" FontSize="32" />
<Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)"> <Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)">
@ -74,11 +74,6 @@
<TextBlock Text="JetBrains Mono" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitJetBrainsMonoFont"/> <TextBlock Text="JetBrains Mono" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitJetBrainsMonoFont"/>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0">
<TextBlock Text="{DynamicResource Text.About.Chart}" />
<TextBlock Text="LiveCharts2" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitLiveCharts2"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0"> <StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0">
<TextBlock Text="{DynamicResource Text.About.SourceCode}" /> <TextBlock Text="{DynamicResource Text.About.SourceCode}" />
<TextBlock Text="Github" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitSourceCode"/> <TextBlock Text="Github" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitSourceCode"/>

View file

@ -44,12 +44,6 @@ namespace SourceGit.Views
e.Handled = true; e.Handled = true;
} }
private void OnVisitLiveCharts2(object _, PointerPressedEventArgs e)
{
Native.OS.OpenBrowser("https://livecharts.dev/");
e.Handled = true;
}
private void OnVisitSourceCode(object _, PointerPressedEventArgs e) private void OnVisitSourceCode(object _, PointerPressedEventArgs e)
{ {
Native.OS.OpenBrowser("https://github.com/sourcegit-scm/sourcegit"); Native.OS.OpenBrowser("https://github.com/sourcegit-scm/sourcegit");

View file

@ -43,8 +43,7 @@
Fill="DarkOrange"/> Fill="DarkOrange"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" <TextBlock Grid.Column="1" Margin="8,0,0,0"
Text="{DynamicResource Text.Checkout.Commit.Warning}" Text="{DynamicResource Text.Checkout.Commit.Warning}"
TextWrapping="Wrap" TextWrapping="Wrap"/>
Foreground="DarkOrange"/>
</Grid> </Grid>
</Grid> </Grid>
</StackPanel> </StackPanel>

View file

@ -18,7 +18,7 @@
Fill="DarkOrange"/> Fill="DarkOrange"/>
<TextBlock Margin="4,0,0,0" <TextBlock Margin="4,0,0,0"
Text="{DynamicResource Text.Discard.Warning}" Text="{DynamicResource Text.Discard.Warning}"
Foreground="DarkOrange"/> Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
<ContentControl Margin="0,16,0,8" Content="{Binding Mode}"> <ContentControl Margin="0,16,0,8" Content="{Binding Mode}">

View file

@ -51,14 +51,7 @@
<ToggleButton Classes="time_display_mode" <ToggleButton Classes="time_display_mode"
Width="10" Height="10" Width="10" Height="10"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=DisplayTimeAsPeriodInHistories, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=DisplayTimeAsPeriodInHistories, Mode=TwoWay}"/>
<TextBlock Classes="table_header" <TextBlock Classes="table_header" Margin="6,0,0,0" Text="{DynamicResource Text.Histories.Header.Time}"/>
Margin="6,0,0,0"
Text="{DynamicResource Text.Histories.Header.Time}"
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowAuthorTimeInGraph, Converter={x:Static BoolConverters.Not}, Mode=OneWay}"/>
<TextBlock Classes="table_header"
Margin="6,0,0,0"
Text="{DynamicResource Text.Histories.Header.AuthorTime}"
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowAuthorTimeInGraph, Mode=OneWay}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
@ -187,13 +180,13 @@
Opacity="{Binding Opacity}"/> Opacity="{Binding Opacity}"/>
</Border> </Border>
<!-- TIME --> <!-- COMMIT TIME -->
<Border Grid.Column="3" Padding="4,0" ClipToBounds="True" IsHitTestVisible="False"> <Border Grid.Column="3" Padding="4,0" ClipToBounds="True" IsHitTestVisible="False">
<v:CommitTimeTextBlock Classes="primary" <v:CommitTimeTextBlock Classes="primary"
HorizontalAlignment="Center" HorizontalAlignment="Center"
FontWeight="{Binding FontWeight}" FontWeight="{Binding FontWeight}"
Opacity="{Binding Opacity}" Opacity="{Binding Opacity}"
UseAuthorTime="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowAuthorTimeInGraph, Mode=OneWay}" Timestamp="{Binding CommitterTime}"
ShowAsDateTime="{Binding Source={x:Static vm:Preference.Instance}, Path=!DisplayTimeAsPeriodInHistories}"/> ShowAsDateTime="{Binding Source={x:Static vm:Preference.Instance}, Path=!DisplayTimeAsPeriodInHistories}"/>
</Border> </Border>
</Grid> </Grid>

View file

@ -303,13 +303,13 @@ namespace SourceGit.Views
set => SetValue(ShowAsDateTimeProperty, value); set => SetValue(ShowAsDateTimeProperty, value);
} }
public static readonly StyledProperty<bool> UseAuthorTimeProperty = public static readonly StyledProperty<ulong> TimestampProperty =
AvaloniaProperty.Register<CommitTimeTextBlock, bool>(nameof(UseAuthorTime), true); AvaloniaProperty.Register<CommitTimeTextBlock, ulong>(nameof(Timestamp));
public bool UseAuthorTime public ulong Timestamp
{ {
get => GetValue(UseAuthorTimeProperty); get => GetValue(TimestampProperty);
set => SetValue(UseAuthorTimeProperty, value); set => SetValue(TimestampProperty, value);
} }
protected override Type StyleKeyOverride => typeof(TextBlock); protected override Type StyleKeyOverride => typeof(TextBlock);
@ -318,7 +318,7 @@ namespace SourceGit.Views
{ {
base.OnPropertyChanged(change); base.OnPropertyChanged(change);
if (change.Property == UseAuthorTimeProperty) if (change.Property == TimestampProperty)
{ {
SetCurrentValue(TextProperty, GetDisplayText()); SetCurrentValue(TextProperty, GetDisplayText());
} }
@ -347,12 +347,6 @@ namespace SourceGit.Views
StopTimer(); StopTimer();
} }
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
SetCurrentValue(TextProperty, GetDisplayText());
}
private void StartTimer() private void StartTimer()
{ {
if (_refreshTimer != null) if (_refreshTimer != null)
@ -382,35 +376,30 @@ namespace SourceGit.Views
private string GetDisplayText() private string GetDisplayText()
{ {
var commit = DataContext as Models.Commit;
if (commit == null)
return string.Empty;
var timestamp = UseAuthorTime ? commit.AuthorTime : commit.CommitterTime;
if (ShowAsDateTime) if (ShowAsDateTime)
return DateTime.UnixEpoch.AddSeconds(timestamp).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss"); return DateTime.UnixEpoch.AddSeconds(Timestamp).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss");
var today = DateTime.Today; var today = DateTime.Today;
var localTime = DateTime.UnixEpoch.AddSeconds(timestamp).ToLocalTime(); var committerTime = DateTime.UnixEpoch.AddSeconds(Timestamp).ToLocalTime();
if (localTime >= today) if (committerTime >= today)
{ {
var now = DateTime.Now; var now = DateTime.Now;
var timespan = now - localTime; var timespan = now - committerTime;
if (timespan.TotalHours > 1) if (timespan.TotalHours > 1)
return App.Text("Period.HoursAgo", (int)timespan.TotalHours); return App.Text("Period.HoursAgo", (int)timespan.TotalHours);
return timespan.TotalMinutes < 1 ? App.Text("Period.JustNow") : App.Text("Period.MinutesAgo", (int)timespan.TotalMinutes); return timespan.TotalMinutes < 1 ? App.Text("Period.JustNow") : App.Text("Period.MinutesAgo", (int)timespan.TotalMinutes);
} }
var diffYear = today.Year - localTime.Year; var diffYear = today.Year - committerTime.Year;
if (diffYear == 0) if (diffYear == 0)
{ {
var diffMonth = today.Month - localTime.Month; var diffMonth = today.Month - committerTime.Month;
if (diffMonth > 0) if (diffMonth > 0)
return diffMonth == 1 ? App.Text("Period.LastMonth") : App.Text("Period.MonthsAgo", diffMonth); return diffMonth == 1 ? App.Text("Period.LastMonth") : App.Text("Period.MonthsAgo", diffMonth);
var diffDay = today.Day - localTime.Day; var diffDay = today.Day - committerTime.Day;
return diffDay == 1 ? App.Text("Period.Yesterday") : App.Text("Period.DaysAgo", diffDay); return diffDay == 1 ? App.Text("Period.Yesterday") : App.Text("Period.DaysAgo", diffDay);
} }

View file

@ -59,14 +59,14 @@
<!-- Body --> <!-- Body -->
<Border Grid.Row="2" Margin="8,0,8,8" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"> <Border Grid.Row="2" Margin="8,0,8,8" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
<Grid RowDefinitions="*,3,*"> <Grid RowDefinitions="*,3,*">
<v:InteractiveRebaseListBox Grid.Row="0" <ListBox Grid.Row="0"
Focusable="True" Background="{DynamicResource Brush.Contents}"
Background="{DynamicResource Brush.Contents}" ItemsSource="{Binding Items}"
ItemsSource="{Binding Items}" SelectionMode="Single"
SelectionMode="Single" SelectedItem="{Binding SelectedItem, Mode=OneWayToSource}"
SelectedItem="{Binding SelectedItem, Mode=OneWayToSource}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"> KeyDown="OnItemsListBoxKeyDown">
<ListBox.Styles> <ListBox.Styles>
<Style Selector="ListBoxItem"> <Style Selector="ListBoxItem">
<Setter Property="Margin" Value="0"/> <Setter Property="Margin" Value="0"/>
@ -213,18 +213,18 @@
<TextBlock Grid.Column="6" Classes="primary" Text="{Binding Commit.CommitterTimeStr}" Margin="8,0"/> <TextBlock Grid.Column="6" Classes="primary" Text="{Binding Commit.CommitterTimeStr}" Margin="8,0"/>
<!-- MoveUp Button --> <!-- MoveUp Button -->
<Button Grid.Column="7" Classes="icon_button" Click="OnMoveItemUp" ToolTip.Tip="Alt+Up"> <Button Grid.Column="7" Classes="icon_button" Click="OnMoveItemUp" ToolTip.Tip="{DynamicResource Text.InteractiveRebase.MoveUp}">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Up}"/> <Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Up}"/>
</Button> </Button>
<!-- MoveDown Button --> <!-- MoveDown Button -->
<Button Grid.Column="8" Classes="icon_button" Click="OnMoveItemDown" ToolTip.Tip="Alt+Down"> <Button Grid.Column="8" Classes="icon_button" Click="OnMoveItemDown" ToolTip.Tip="{DynamicResource Text.InteractiveRebase.MoveDown}">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Down}"/> <Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Down}"/>
</Button> </Button>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</v:InteractiveRebaseListBox> </ListBox>
<v:LoadingIcon Grid.Row="0" Width="48" Height="48" HorizontalAlignment="Center" VerticalAlignment="Center" IsVisible="{Binding IsLoading}"/> <v:LoadingIcon Grid.Row="0" Width="48" Height="48" HorizontalAlignment="Center" VerticalAlignment="Center" IsVisible="{Binding IsLoading}"/>

View file

@ -1,79 +1,9 @@
using System;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
namespace SourceGit.Views namespace SourceGit.Views
{ {
public class InteractiveRebaseListBox : ListBox
{
protected override Type StyleKeyOverride => typeof(ListBox);
/// <summary>
/// Prevent ListBox handle the arrow keys.
/// </summary>
/// <param name="e"></param>
protected override void OnKeyDown(KeyEventArgs e)
{
var vm = DataContext as ViewModels.InteractiveRebase;
if (vm == null)
return;
var item = vm.SelectedItem;
if (item == null)
{
base.OnKeyDown(e);
return;
}
if (e.Key == Key.P)
{
item.SetAction(Models.InteractiveRebaseAction.Pick);
e.Handled = true;
}
else if (e.Key == Key.E)
{
item.SetAction(Models.InteractiveRebaseAction.Edit);
e.Handled = true;
}
else if (e.Key == Key.R)
{
item.SetAction(Models.InteractiveRebaseAction.Reword);
e.Handled = true;
}
else if (e.Key == Key.S)
{
item.SetAction(Models.InteractiveRebaseAction.Squash);
e.Handled = true;
}
else if (e.Key == Key.F)
{
item.SetAction(Models.InteractiveRebaseAction.Fixup);
e.Handled = true;
}
else if (e.Key == Key.D)
{
item.SetAction(Models.InteractiveRebaseAction.Drop);
e.Handled = true;
}
else if (e.KeyModifiers == KeyModifiers.Alt && e.Key == Key.Up)
{
vm.MoveItemUp(item);
e.Handled = true;
}
else if (e.KeyModifiers == KeyModifiers.Alt && e.Key == Key.Down)
{
vm.MoveItemDown(item);
e.Handled = true;
}
else
{
base.OnKeyDown(e);
}
}
}
public partial class InteractiveRebase : ChromelessWindow public partial class InteractiveRebase : ChromelessWindow
{ {
public InteractiveRebase() public InteractiveRebase()
@ -159,6 +89,26 @@ namespace SourceGit.Views
} }
} }
private void OnItemsListBoxKeyDown(object sender, KeyEventArgs e)
{
var item = (sender as ListBox)?.SelectedItem as ViewModels.InteractiveRebaseItem;
if (item == null)
return;
if (e.Key == Key.P)
item.SetAction(Models.InteractiveRebaseAction.Pick);
else if (e.Key == Key.E)
item.SetAction(Models.InteractiveRebaseAction.Edit);
else if (e.Key == Key.R)
item.SetAction(Models.InteractiveRebaseAction.Reword);
else if (e.Key == Key.S)
item.SetAction(Models.InteractiveRebaseAction.Squash);
else if (e.Key == Key.F)
item.SetAction(Models.InteractiveRebaseAction.Fixup);
else if (e.Key == Key.D)
item.SetAction(Models.InteractiveRebaseAction.Drop);
}
private async void StartJobs(object _1, RoutedEventArgs _2) private async void StartJobs(object _1, RoutedEventArgs _2)
{ {
var vm = DataContext as ViewModels.InteractiveRebase; var vm = DataContext as ViewModels.InteractiveRebase;

View file

@ -52,7 +52,7 @@
<TabItem.Header> <TabItem.Header>
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/> <TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/>
</TabItem.Header> </TabItem.Header>
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*"> <Grid Margin="8" RowDefinitions="32,32,32,32,32" ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Grid.Column="0" <TextBlock Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.General.Locale}" Text="{DynamicResource Text.Preference.General.Locale}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -113,11 +113,6 @@
</Grid> </Grid>
<CheckBox Grid.Row="4" Grid.Column="1" <CheckBox Grid.Row="4" Grid.Column="1"
Height="32"
Content="{DynamicResource Text.Preference.General.ShowAuthorTime}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowAuthorTimeInGraph, Mode=TwoWay}"/>
<CheckBox Grid.Row="5" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Preference.General.Check4UpdatesOnStartup}" Content="{DynamicResource Text.Preference.General.Check4UpdatesOnStartup}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=Check4UpdatesOnStartup, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=Check4UpdatesOnStartup, Mode=TwoWay}"/>

View file

@ -137,22 +137,7 @@ namespace SourceGit.Views
SetIfChanged(config, "gpg.format", GPGFormat.Value, "openpgp"); SetIfChanged(config, "gpg.format", GPGFormat.Value, "openpgp");
if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal)) if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal))
{ SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGExecutableFile, "");
var oldGPG = string.Empty;
if (GPGFormat.Value == "openpgp" && config.TryGetValue("gpg.program", out var openpgp))
oldGPG = openpgp;
else if (config.TryGetValue($"gpg.{GPGFormat.Value}.program", out var gpgProgram))
oldGPG = gpgProgram;
bool changed = false;
if (!string.IsNullOrEmpty(oldGPG))
changed = oldGPG != GPGExecutableFile;
else if (!string.IsNullOrEmpty(GPGExecutableFile))
changed = true;
if (changed)
new Commands.Config(null).Set($"gpg.{GPGFormat.Value}.program", GPGExecutableFile);
}
base.OnClosing(e); base.OnClosing(e);
} }

View file

@ -128,7 +128,13 @@
BorderBrush="{DynamicResource Brush.Border2}" BorderBrush="{DynamicResource Brush.Border2}"
Watermark="{DynamicResource Text.Repository.Filter}" Watermark="{DynamicResource Text.Repository.Filter}"
Text="{Binding Filter, Mode=TwoWay}" Text="{Binding Filter, Mode=TwoWay}"
VerticalContentAlignment="Center"> VerticalContentAlignment="Center">
<TextBox.Styles>
<Style Selector="TextBox /template/ TextBlock#PART_Watermark">
<Setter Property="FontSize" Value="12"/>
</Style>
</TextBox.Styles>
<TextBox.InnerLeftContent> <TextBox.InnerLeftContent>
<Path Width="14" Height="14" <Path Width="14" Height="14"
Margin="6,0,0,0" Margin="6,0,0,0"
@ -460,6 +466,12 @@
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0"/>
<Setter Property="Height" Value="50"/> <Setter Property="Height" Value="50"/>
</Style> </Style>
<Style Selector="ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
</Style>
</ListBox.Styles> </ListBox.Styles>
<ListBox.ItemsPanel> <ListBox.ItemsPanel>

View file

@ -11,7 +11,7 @@
<TextBlock FontSize="18" <TextBlock FontSize="18"
Classes="bold" Classes="bold"
Text="{DynamicResource Text.Stash.Title}"/> Text="{DynamicResource Text.Stash.Title}"/>
<Grid Margin="8,16,0,0" RowDefinitions="32,Auto,Auto" ColumnDefinitions="120,*"> <Grid Margin="8,16,0,0" RowDefinitions="32,Auto" ColumnDefinitions="120,*">
<TextBlock Grid.Row="0" Grid.Column="0" <TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="8,0" Margin="8,0"
@ -23,24 +23,11 @@
Watermark="{DynamicResource Text.Stash.Message.Placeholder}" Watermark="{DynamicResource Text.Stash.Message.Placeholder}"
v:AutoFocusBehaviour.IsEnabled="True"/> v:AutoFocusBehaviour.IsEnabled="True"/>
<TextBlock Grid.Row="1" Grid.Column="1"
Margin="0,4,0,0"
Text="{DynamicResource Text.Stash.TipForSelectedFiles}"
TextWrapping="Wrap"
Foreground="{DynamicResource Brush.FG2}"
IsVisible="{Binding HasSelectedFiles}"/>
<CheckBox Grid.Row="1" Grid.Column="1" <CheckBox Grid.Row="1" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Stash.IncludeUntracked}" Content="{DynamicResource Text.Stash.IncludeUntracked}"
IsChecked="{Binding IncludeUntracked, Mode=TwoWay}" IsChecked="{Binding IncludeUntracked, Mode=TwoWay}"
IsVisible="{Binding !HasSelectedFiles}"/> IsVisible="{Binding CanIgnoreUntracked}"/>
<CheckBox Grid.Row="2" Grid.Column="1"
Height="32"
Content="{DynamicResource Text.Stash.OnlyStagedChanges}"
IsChecked="{Binding OnlyStaged, Mode=TwoWay}"
IsVisible="{Binding !HasSelectedFiles}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View file

@ -74,7 +74,7 @@
</ContentControl.DataTemplates> </ContentControl.DataTemplates>
</ContentControl> </ContentControl>
<StackPanel x:Name="Popup" IsVisible="False" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Effect="drop-shadow(0 0 8 #80000000)"> <StackPanel x:Name="Popup" IsVisible="False" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Effect="drop-shadow(0 0 6 #40000000)">
<Button Classes="flat" Content="{DynamicResource Text.Hunk.Stage}" Click="OnStageChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange}"/> <Button Classes="flat" Content="{DynamicResource Text.Hunk.Stage}" Click="OnStageChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange}"/>
<Button Classes="flat" Content="{DynamicResource Text.Hunk.Unstage}" Click="OnUnstageChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange, Converter={x:Static BoolConverters.Not}}"/> <Button Classes="flat" Content="{DynamicResource Text.Hunk.Unstage}" Click="OnUnstageChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange, Converter={x:Static BoolConverters.Not}}"/>
<Button Classes="flat" Content="{DynamicResource Text.Hunk.Discard}" Margin="8,0,0,0" Click="OnDiscardChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange}"/> <Button Classes="flat" Content="{DynamicResource Text.Hunk.Discard}" Margin="8,0,0,0" Click="OnDiscardChunk" IsVisible="{Binding #ThisControl.IsUnstagedChange}"/>