Don't pass strings not containing accelerators to ParseAccel().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Dec 2010 11:18:42 +0000 (11:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Dec 2010 11:18:42 +0000 (11:18 +0000)
commit6fc7a1ad1c370005d66286b586c50d49da764aed
treeea69d68eeea4d069b3f2a819e1e8979b07cbb182
parenta67c2d41615427fefdbfdb773dda2d0317ba4bf9
Don't pass strings not containing accelerators to ParseAccel().

Check for the presence of accelerator part in the string passed to
wxAcceleratorEntry::Create() and don't call ParseAccel() at all if it's not
there. This avoids the spurious warnings about unrecognized accelerators when
creating menu items that don't have any accelerators at all.

Also update wxAcceleratorEntry::FromString() documentation to mention that
the new code should pass just the accelerator to this function and that it
only accepts full menu item labels for compatibility.

Closes #12770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
interface/wx/accel.h
src/common/accelcmn.cpp