From: Stefan Csomor Date: Tue, 16 Aug 2011 13:46:56 +0000 (+0000) Subject: adapting to new ctrl constant handling on OSX X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/675ec6655eb3a67caa1d648f912d754ae328c38f adapting to new ctrl constant handling on OSX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/cmdproc.cpp b/src/common/cmdproc.cpp index f59886d0a5..7de08c2790 100644 --- a/src/common/cmdproc.cpp +++ b/src/common/cmdproc.cpp @@ -62,8 +62,8 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands) #endif // wxUSE_MENUS #if wxUSE_ACCEL - m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CMD, 'Z').ToString(); - m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CMD, 'Y').ToString(); + m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString(); + m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString(); #endif // wxUSE_ACCEL m_lastSavedCommand = diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 2df465503d..da579718b1 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -281,17 +281,17 @@ wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id) switch (id) { - STOCKITEM(wxID_COPY, wxACCEL_CMD,'C') - STOCKITEM(wxID_CUT, wxACCEL_CMD,'X') - STOCKITEM(wxID_FIND, wxACCEL_CMD,'F') - STOCKITEM(wxID_HELP, wxACCEL_CMD,'H') - STOCKITEM(wxID_NEW, wxACCEL_CMD,'N') - STOCKITEM(wxID_OPEN, wxACCEL_CMD,'O') - STOCKITEM(wxID_PASTE, wxACCEL_CMD,'V') - STOCKITEM(wxID_REDO, wxACCEL_CMD | wxACCEL_SHIFT,'Z') - STOCKITEM(wxID_REPLACE, wxACCEL_CMD,'R') - STOCKITEM(wxID_SAVE, wxACCEL_CMD,'S') - STOCKITEM(wxID_UNDO, wxACCEL_CMD,'Z') + STOCKITEM(wxID_COPY, wxACCEL_CTRL,'C') + STOCKITEM(wxID_CUT, wxACCEL_CTRL,'X') + STOCKITEM(wxID_FIND, wxACCEL_CTRL,'F') + STOCKITEM(wxID_HELP, wxACCEL_CTRL,'H') + STOCKITEM(wxID_NEW, wxACCEL_CTRL,'N') + STOCKITEM(wxID_OPEN, wxACCEL_CTRL,'O') + STOCKITEM(wxID_PASTE, wxACCEL_CTRL,'V') + STOCKITEM(wxID_REDO, wxACCEL_CTRL | wxACCEL_SHIFT,'Z') + STOCKITEM(wxID_REPLACE, wxACCEL_CTRL,'R') + STOCKITEM(wxID_SAVE, wxACCEL_CTRL,'S') + STOCKITEM(wxID_UNDO, wxACCEL_CTRL,'Z') default: // set the wxAcceleratorEntry to return into an invalid state: diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index f5039443c5..43d636458b 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -293,12 +293,12 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va // Accelerators wxAcceleratorEntry entries[6]; - entries[0].Set(wxACCEL_CMD, (int) 'C', wxID_COPY); - entries[1].Set(wxACCEL_CMD, (int) 'X', wxID_CUT); - entries[2].Set(wxACCEL_CMD, (int) 'V', wxID_PASTE); - entries[3].Set(wxACCEL_CMD, (int) 'A', wxID_SELECTALL); - entries[4].Set(wxACCEL_CMD, (int) 'Z', wxID_UNDO); - entries[5].Set(wxACCEL_CMD, (int) 'Y', wxID_REDO); + entries[0].Set(wxACCEL_CTRL, (int) 'C', wxID_COPY); + entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_CUT); + entries[2].Set(wxACCEL_CTRL, (int) 'V', wxID_PASTE); + entries[3].Set(wxACCEL_CTRL, (int) 'A', wxID_SELECTALL); + entries[4].Set(wxACCEL_CTRL, (int) 'Z', wxID_UNDO); + entries[5].Set(wxACCEL_CTRL, (int) 'Y', wxID_REDO); wxAcceleratorTable accel(6, entries); SetAcceleratorTable(accel);