Browse Source

Remove menu items for code converter (which no longer exists in SD5)

pull/326/merge
Daniel Grunwald 12 years ago
parent
commit
7f031933d8
  1. 20
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  2. 1
      src/Main/Core/Project/Src/Util/CommandWrapper.cs

20
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -427,11 +427,6 @@ @@ -427,11 +427,6 @@
<MenuItem id = "SetAsStartupProject"
label = "${res:ProjectComponent.ContextMenu.SetAsStartupProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.SetAsStartupProject"/>
<MenuItem id = "Convert"
label = "${res:ICSharpCode.SharpDevelop.Commands.Convert}"
type = "Menu">
<!-- elements are added by backend bindings -->
</MenuItem>
<MenuItem id = "GenerateDocumentation"
label = "${res:ProjectComponent.ContextMenu.GenerateDocumentation}"
class = "ICSharpCode.SharpDevelop.Project.Commands.GenerateProjectDocumentation"/>
@ -1915,21 +1910,6 @@ @@ -1915,21 +1910,6 @@
<Include id = "ToolList" path = "/SharpDevelop/Workbench/Tools" />
<MenuItem id = "Separator2" type = "Separator" />
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.Editor.ITextEditor">
<MenuItem id = "ConvertCode" label = "${res:XML.MainMenu.ToolMenu.ConvertCodeTo}" type="Menu">
<Condition name="ActiveContentExtension" activeextension=".vb" action = "Disable">
<MenuItem id = "CSharp"
label = "C#"
class = "ICSharpCode.SharpDevelop.Commands.CSharpConvertBuffer"/>
</Condition>
<Condition name="ActiveContentExtension" activeextension=".cs" action = "Disable">
<MenuItem id = "VB"
label = "Visual Basic"
class = "ICSharpCode.SharpDevelop.Commands.VBConvertBuffer"/>
</Condition>
</MenuItem>
</Condition>
<Condition name = "SolutionOpen" action="Disable">
<MenuItem id = "Upgrade"
label = "${res:ICSharpCode.SharpDevelop.Project.UpgradeView.Title}"

1
src/Main/Core/Project/Src/Util/CommandWrapper.cs

@ -146,6 +146,7 @@ namespace ICSharpCode.Core @@ -146,6 +146,7 @@ namespace ICSharpCode.Core
canExecuteChangedHandlersToRegisterOnCommand = null;
foreach (var handler in handlers) {
if (addInCommand != null)
addInCommand.CanExecuteChanged += handler;
// Creating the command potentially changes the CanExecute state, so we should raise the event handlers once:
handler(this, EventArgs.Empty);

Loading…
Cancel
Save