diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-09-10 15:48:21 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-09-10 15:48:56 +0300 |
commit | f91981be59d9808aae544f2aed7fb647df35a9c9 (patch) | |
tree | a5421ddca26fa37faf7b5aafe9a9de04a1b730b6 /main/src/addins/VersionControl | |
parent | b7847b663fd34fa0987cd4d5a33884a393eab00c (diff) |
[Git] Remodel the commit dialog title extension to work the other way around
Diffstat (limited to 'main/src/addins/VersionControl')
3 files changed, 6 insertions, 6 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs index 2c5ee21261..e058292500 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs @@ -55,10 +55,10 @@ namespace MonoDevelop.VersionControl.Git return false; } - public override string GetTitleToAppend (ChangeSet changeSet) + public override string FormatDialogTitle (ChangeSet changeSet, string title) { var gitRepo = changeSet.Repository as GitRepository; - return gitRepo != null ? string.Format ("({0})", gitRepo.GetCurrentBranch ()) : null; + return gitRepo != null ? string.Format ("{0} ({1})", title, gitRepo.GetCurrentBranch ()) : title; } public override bool OnBeginCommit (ChangeSet changeSet) diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs index c1bb80651b..6a723a0f01 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs @@ -90,9 +90,9 @@ namespace MonoDevelop.VersionControl.Dialogs continue; } if (ext.Initialize (changeSet)) { - string toAppend = ext.GetTitleToAppend (changeSet); - if (!string.IsNullOrEmpty (toAppend)) - Title = string.Format ("{0} {1}", Title, toAppend); + var newTitle = ext.FormatDialogTitle (changeSet, Title); + if (newTitle != null) + Title = newTitle; ext.CommitMessageTextViewHook (textview); if (separatorRequired) { diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitDialogExtension.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitDialogExtension.cs index 760cfdc31d..eb2d119063 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitDialogExtension.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitDialogExtension.cs @@ -24,7 +24,7 @@ namespace MonoDevelop.VersionControl return true; } - public virtual string GetTitleToAppend (ChangeSet changeSet) + public virtual string FormatDialogTitle (ChangeSet changeSet, string title) { return null; } |