Browse Source

Move Insert color & Insert GUID to edit menu.

Create submenu for "convert code" commands.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1763 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
6e47a8a518
  1. 44
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 21
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin
  3. 3
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

44
AddIns/ICSharpCode.SharpDevelop.addin

@ -1265,6 +1265,17 @@
type = "Item" type = "Item"
loadclasslazy = "false" loadclasslazy = "false"
class = "ICSharpCode.SharpDevelop.Commands.Delete"/> class = "ICSharpCode.SharpDevelop.Commands.Delete"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable">
<MenuItem id = "Insert" label = "${res:XML.MainMenu.EditMenu.Insert}" type="Menu">
<MenuItem id = "InsertColor"
label = "${res:XML.MainMenu.ToolMenu.InsColor}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowColorDialog"/>
<MenuItem id = "InsertGuid"
shortcut = "Control|Shift|G"
label = "${res:XML.MainMenu.ToolMenu.InsGUID}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.InsertGuidCommand"/>
</MenuItem>
</Condition>
<MenuItem id = "SelectAll" <MenuItem id = "SelectAll"
label = "${res:XML.MainMenu.EditMenu.SelectAll}" label = "${res:XML.MainMenu.EditMenu.SelectAll}"
type = "Item" type = "Item"
@ -1495,30 +1506,21 @@
<Condition name = "WindowActive" activewindow="ICSharpCode.FormsDesigner.FormsDesignerViewContent"/> <Condition name = "WindowActive" activewindow="ICSharpCode.FormsDesigner.FormsDesignerViewContent"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/> <Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/>
</Or> </Or>
<Condition name="ActiveContentExtension" activeextension=".cs" action = "Disable"> <MenuItem id = "ConvertCode" label = "${res:XML.MainMenu.ToolMenu.ConvertCodeTo}" type="Menu">
<MenuItem id = "ConvertBuffer" <Condition name="ActiveContentExtension" activeextension=".vb" action = "Disable">
label = "${res:XML.MainMenu.ToolMenu.ConvertBufferToVBNET}" <MenuItem id = "CSharp"
class = "ICSharpCode.SharpDevelop.Commands.VBConvertBuffer"/> label = "C#"
</Condition> class = "ICSharpCode.SharpDevelop.Commands.CSharpConvertBuffer"/>
<Condition name="ActiveContentExtension" activeextension=".vb" action = "Disable"> </Condition>
<MenuItem id = "ConvertCSharpBuffer" <Condition name="ActiveContentExtension" activeextension=".cs" action = "Disable">
label = "${res:XML.MainMenu.ToolMenu.ConvertBufferToCSharp}" <MenuItem id = "VBNet"
class = "ICSharpCode.SharpDevelop.Commands.CSharpConvertBuffer"/> label = "VB.NET"
</Condition> class = "ICSharpCode.SharpDevelop.Commands.VBConvertBuffer"/>
</Condition>
</MenuItem>
</ComplexCondition> </ComplexCondition>
<MenuItem id = "Separator3" type = "Separator" />
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable"> <Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable">
<MenuItem id = "InsertColor"
label = "${res:XML.MainMenu.ToolMenu.InsColor}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowColorDialog"/>
<MenuItem id = "InsertGuid"
shortcut = "Control|Shift|G"
label = "${res:XML.MainMenu.ToolMenu.InsGUID}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.InsertGuidCommand"/>
<MenuItem id = "Separator4" type = "Separator" />
<MenuItem id = "GenerateCodeAction" <MenuItem id = "GenerateCodeAction"
label = "${res:XML.MainMenu.ToolMenu.GenerateCode}" label = "${res:XML.MainMenu.ToolMenu.GenerateCode}"
shortcut = "Alt|Insert" shortcut = "Alt|Insert"

21
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin

@ -137,22 +137,15 @@
class = "Grunwald.BooBinding.BooLanguageBinding" /> class = "Grunwald.BooBinding.BooLanguageBinding" />
</Path> </Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools"> <Path name = "/SharpDevelop/Workbench/MainMenu/Tools/ConvertCode">
<ComplexCondition action = "Disable"> <ComplexCondition action = "Disable">
<And> <Or>
<Or> <Condition name="ActiveContentExtension" activeextension=".cs"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormsDesigner.FormsDesignerViewContent"/> <Condition name="ActiveContentExtension" activeextension=".vb"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/> </Or>
</Or>
<Or>
<Condition name="ActiveContentExtension" activeextension=".cs"/>
<Condition name="ActiveContentExtension" activeextension=".vb"/>
</Or>
</And>
<MenuItem id = "ConvertBufferToBoo" <MenuItem id = "ConvertBufferToBoo"
insertbefore = "ConvertBuffer" insertbefore = "CSharp"
insertafter = "Separator2" label = "Boo"
label = "${res:XML.MainMenu.ToolMenu.ConvertBufferToBoo}"
class = "Grunwald.BooBinding.ConvertBuffer"/> class = "Grunwald.BooBinding.ConvertBuffer"/>
</ComplexCondition> </ComplexCondition>
</Path> </Path>

3
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

@ -251,7 +251,8 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
wasChangedExternally = false; wasChangedExternally = false;
string message = StringParser.Parse("${res:ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.TextEditorDisplayBinding.FileAlteredMessage}", new string[,] {{"File", Path.GetFullPath(textAreaControl.FileName)}}); string message = StringParser.Parse("${res:ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.TextEditorDisplayBinding.FileAlteredMessage}", new string[,] {{"File", Path.GetFullPath(textAreaControl.FileName)}});
if (MessageBox.Show(message, if (IsDirty == false ||
MessageBox.Show(message,
StringParser.Parse("${res:MainWindow.DialogName}"), StringParser.Parse("${res:MainWindow.DialogName}"),
MessageBoxButtons.YesNo, MessageBoxButtons.YesNo,
MessageBoxIcon.Question) == DialogResult.Yes) { MessageBoxIcon.Question) == DialogResult.Yes) {

Loading…
Cancel
Save