diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2012-03-20 17:44:22 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2012-03-29 21:54:11 +0400 |
commit | ae287cc529e5f6746a02fadbb56ca22fee6d2987 (patch) | |
tree | 26aaec9bdf9a1b145ae9213200a4bb0e494e0fcd /main/src/addins/VersionControl | |
parent | 4fb0b87b83209e6322e0294a406cbc39b598861d (diff) |
[VersionControl] Only display the Merge/Diff/Log/etc commands on versioned items
Items which are not under version control should not have these commands available
Diffstat (limited to 'main/src/addins/VersionControl')
4 files changed, 12 insertions, 4 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/BlameCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/BlameCommand.cs index a6d4e04636..15be7f4e61 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/BlameCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/BlameCommand.cs @@ -39,7 +39,9 @@ namespace MonoDevelop.VersionControl static bool CanShow (VersionControlItem item) { - return !item.IsDirectory && AddinManager.GetExtensionObjects<IBlameViewHandler> (BlameViewHandlers).Any (h => h.CanHandle (item)); + return !item.IsDirectory + && item.VersionInfo.IsVersioned + && AddinManager.GetExtensionObjects<IBlameViewHandler> (BlameViewHandlers).Any (h => h.CanHandle (item)); } public static bool Show (VersionControlItemList items, bool test) diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/DiffCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/DiffCommand.cs index 3155da86a8..992d56f378 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/DiffCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/DiffCommand.cs @@ -39,7 +39,9 @@ namespace MonoDevelop.VersionControl static bool CanShow (VersionControlItem item) { - return !item.IsDirectory && AddinManager.GetExtensionObjects<IDiffViewHandler> (DiffViewHandlers).Any (h => h.CanHandle (item)); + return !item.IsDirectory + && item.VersionInfo.IsVersioned + && AddinManager.GetExtensionObjects<IDiffViewHandler> (DiffViewHandlers).Any (h => h.CanHandle (item)); } public static bool Show (VersionControlItemList items, bool test) diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LogCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LogCommand.cs index 0d002c8af3..480567f4a3 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LogCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LogCommand.cs @@ -39,7 +39,9 @@ namespace MonoDevelop.VersionControl static bool CanShow (VersionControlItem item) { - return !item.IsDirectory && AddinManager.GetExtensionObjects<ILogViewHandler> (LogViewHandlers).Any (h => h.CanHandle (item)); + return !item.IsDirectory + && item.VersionInfo.IsVersioned + && AddinManager.GetExtensionObjects<ILogViewHandler> (LogViewHandlers).Any (h => h.CanHandle (item)); } public static bool Show (VersionControlItemList items, bool test) diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/MergeCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/MergeCommand.cs index 06eff36b6b..522fd6b3e8 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/MergeCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/MergeCommand.cs @@ -39,7 +39,9 @@ namespace MonoDevelop.VersionControl static bool CanShow (VersionControlItem item) { - return !item.IsDirectory && AddinManager.GetExtensionObjects<IMergeViewHandler> (MergeViewHandlers).Any (h => h.CanHandle (item)); + return !item.IsDirectory + && item.VersionInfo.IsVersioned + && AddinManager.GetExtensionObjects<IMergeViewHandler> (MergeViewHandlers).Any (h => h.CanHandle (item)); } public static bool Show (VersionControlItemList items, bool test) |