]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxAcceleratorEntry::ToString() for undo/redo accelerator labels.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Dec 2009 02:29:49 +0000 (02:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Dec 2009 02:29:49 +0000 (02:29 +0000)
Don't hardcode the string representation of the accelerators, it was
inconsistent with the rest of wxWidgets which used '-' while here a '+' was
used.

Closes #11512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/cmdproc.cpp

index 5ece41e787903d813d3b2e79ef8a6563301285ca..9cd4fdda472d553fde1d590e6b203a80da4480fe 100644 (file)
@@ -28,6 +28,7 @@
     #include "wx/intl.h"
     #include "wx/string.h"
     #include "wx/menu.h"
+    #include "wx/accel.h"
 #endif //WX_PRECOMP
 
 #include "wx/cmdproc.h"
@@ -59,8 +60,8 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands)
 #if wxUSE_MENUS
     m_commandEditMenu = NULL;
 #endif // wxUSE_MENUS
-    m_undoAccelerator = wxT("\tCtrl+Z");
-    m_redoAccelerator = wxT("\tCtrl+Y");
+    m_undoAccelerator = wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString();
+    m_redoAccelerator = wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString();
 
     m_lastSavedCommand =
     m_currentCommand = wxList::compatibility_iterator();