mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feature<Launcher>: close tabs by context menu; collect garbage after repository closed
This commit is contained in:
parent
a9f138076e
commit
1a46551a77
14 changed files with 145 additions and 103 deletions
|
@ -15,7 +15,6 @@ namespace SourceGit.Git {
|
|||
public class Repository {
|
||||
|
||||
#region HOOKS
|
||||
public static Action<Repository> OnOpen = null;
|
||||
[XmlIgnore] public Action<string> OnNavigateCommit = null;
|
||||
[XmlIgnore] public Action OnWorkingCopyChanged = null;
|
||||
[XmlIgnore] public Action OnTagChanged = null;
|
||||
|
@ -23,6 +22,7 @@ namespace SourceGit.Git {
|
|||
[XmlIgnore] public Action OnBranchChanged = null;
|
||||
[XmlIgnore] public Action OnCommitsChanged = null;
|
||||
[XmlIgnore] public Action OnSubmoduleChanged = null;
|
||||
[XmlIgnore] public Action OnClosing = null;
|
||||
#endregion
|
||||
|
||||
#region PROPERTIES_SAVED
|
||||
|
@ -294,14 +294,14 @@ namespace SourceGit.Git {
|
|||
featurePrefix = GetConfig("gitflow.prefix.feature");
|
||||
releasePrefix = GetConfig("gitflow.prefix.release");
|
||||
hotfixPrefix = GetConfig("gitflow.prefix.hotfix");
|
||||
|
||||
OnOpen?.Invoke(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Close repository.
|
||||
/// </summary>
|
||||
public void Close() {
|
||||
OnClosing?.Invoke();
|
||||
|
||||
OnBranchChanged = null;
|
||||
OnCommitsChanged = null;
|
||||
OnTagChanged = null;
|
||||
|
@ -309,6 +309,7 @@ namespace SourceGit.Git {
|
|||
OnWorkingCopyChanged = null;
|
||||
OnNavigateCommit = null;
|
||||
OnSubmoduleChanged = null;
|
||||
OnClosing = null;
|
||||
|
||||
cachedBranches.Clear();
|
||||
cachedRemotes.Clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue