From d641b2d2a0bfe4d815838e73f4a85c2234254f6d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 30 Jul 2011 21:54:05 +0000 Subject: [PATCH] Fix stock accelerators handling in wxOSX. No modifiers were used for stock accelerators, i.e. Append(wxID_NEW) resulted in an item with the label "New" and plain "N" as accelerator in wxOSX. This was due to wxACCEL_CMD not being handled in wxAcceleratorEntry::ToString() so map it to the same prefix as wxACCEL_CTRL there, this is enough to make the accelerators work even though it's not clear whether this is really the best thing to do or if we should use a separate "Cmd+" prefix for it (and recognize it in Parse() too then) as otherwise it's unclear why do we have wxACCEL_CMD at all, it just seems to be treated identically to wxACCEL_CTRL everywhere. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/accelcmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/accelcmn.cpp b/src/common/accelcmn.cpp index 4d05f3de4d..f52fc05de3 100644 --- a/src/common/accelcmn.cpp +++ b/src/common/accelcmn.cpp @@ -307,7 +307,7 @@ wxString wxAcceleratorEntry::ToString() const int flags = GetFlags(); if ( flags & wxACCEL_ALT ) text += _("Alt+"); - if ( flags & wxACCEL_CTRL ) + if ( flags & (wxACCEL_CTRL | wxACCEL_CMD) ) text += _("Ctrl+"); if ( flags & wxACCEL_SHIFT ) text += _("Shift+"); -- 2.45.2