Last active
March 9, 2016 20:57
-
-
Save spillz/6a76ab3929da9285c05b to your computer and use it in GitHub Desktop.
A patch for Code::Blocks to make cut copy paste shortcuts work for wxSmith
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsitemeditor.cpp | |
=================================================================== | |
--- src/plugins/contrib/wxSmith/wxwidgets/wxsitemeditor.cpp (revision 10323) | |
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsitemeditor.cpp (working copy) | |
@@ -72,6 +72,9 @@ | |
InitializeResourceData(); | |
InitializeVisualStuff(); | |
m_AllEditors.insert(this); | |
+ Connect(wxID_COPY, (wxObjectEventFunction)&wxsItemEditor::Copy); | |
+ Connect(wxID_PASTE, (wxObjectEventFunction)&wxsItemEditor::Paste); | |
+ Connect(wxID_CUT, (wxObjectEventFunction)&wxsItemEditor::Cut); | |
} | |
wxsItemEditor::~wxsItemEditor() | |
Index: src/src/main.cpp | |
=================================================================== | |
--- src/src/main.cpp (revision 10323) | |
+++ src/src/main.cpp (working copy) | |
@@ -174,9 +174,12 @@ | |
int idEditUndo = XRCID("idEditUndo"); | |
int idEditRedo = XRCID("idEditRedo"); | |
int idEditClearHistory = XRCID("idEditClearHistory"); | |
-int idEditCopy = XRCID("idEditCopy"); | |
-int idEditCut = XRCID("idEditCut"); | |
-int idEditPaste = XRCID("idEditPaste"); | |
+//int idEditCopy = XRCID("idEditCopy"); | |
+//int idEditCut = XRCID("idEditCut"); | |
+//int idEditPaste = XRCID("idEditPaste"); | |
+int idEditCopy = XRCID("wxID_COPY"); | |
+int idEditCut = XRCID("wxID_CUT"); | |
+int idEditPaste = XRCID("wxID_PASTE"); | |
int idEditSwapHeaderSource = XRCID("idEditSwapHeaderSource"); | |
int idEditGotoMatchingBrace = XRCID("idEditGotoMatchingBrace"); | |
int idEditHighlightMode = XRCID("idEditHighlightMode"); | |
Index: src/src/resources/main_menu.xrc | |
=================================================================== | |
--- src/src/resources/main_menu.xrc (revision 10323) | |
+++ src/src/resources/main_menu.xrc (working copy) | |
@@ -171,17 +171,17 @@ | |
<bitmap>images\16x16\history_clear.png</bitmap> | |
</object> | |
<object class="separator"/> | |
- <object class="wxMenuItem" name="idEditCut"> | |
+ <object class="wxMenuItem" name="wxID_CUT"> | |
<label>Cu&t</label> | |
<bitmap>images\16x16\editcut.png</bitmap> | |
<help>Copy selected text to clipboard and erase it</help> | |
</object> | |
- <object class="wxMenuItem" name="idEditCopy"> | |
+ <object class="wxMenuItem" name="wxID_COPY"> | |
<label>&Copy</label> | |
<bitmap>images\16x16\editcopy.png</bitmap> | |
<help>Copy selected text to clipboard</help> | |
</object> | |
- <object class="wxMenuItem" name="idEditPaste"> | |
+ <object class="wxMenuItem" name="wxID_PASTE"> | |
<label>&Paste</label> | |
<bitmap>images\16x16\editpaste.png</bitmap> | |
<help>Paste text from clipboard</help> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment