Commit Graph

6 Commits

Author SHA1 Message Date
Vadim Zeitlin
806b2e1692 Update accelerator unit test to pass after recent changes.
Changes of r66379 broke the unit test as wxAcceleratorEntry::Create() now
requires the TAB to be present in the string passed to it (again).

Update the test to make it pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 12:03:54 +00:00
Vadim Zeitlin
944f641cf9 Don't require leading TAB in wxAcceleratorEntry::FromString().
FromString() should parse string returned by ToString() successfully but this
wasn't the case because the accelerator parsing functions always insisted on
having a TAB in the string.

Fix this, document the string format and add a unit test checking for the
correct behaviour.

Closes #12745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-03 12:39:57 +00:00
Vadim Zeitlin
7bc0ff8672 Correct form of mnemonics returned by wxGTK wxMenu::GetTitle().
wxMenu::GetTitle() returned a string in GTK+ format (i.e. using underscores
instead of ampersands) instead of the expected wx one.

This is, of course, the right thing to do and it also fixes
wxMenuBar::FindMenuItem() as a side effect.

Closes #12672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-16 22:38:53 +00:00
Vadim Zeitlin
6ab66823d8 Don't use some "recent" C++98 features not supported by VC6.
Don't return void values nor redeclare the same variable in for loops to fix
VC6 compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-16 22:38:06 +00:00
Vadim Zeitlin
f8314f3c20 Don't use standard menu ids in the unit test to avoid Mac problems.
wxOSX rearranges the standard menu items such as wxID_EXIT and wxID_ABOUT and,
for the former, changes its text to "Quit", so don't use them in the menu unit
test which expects to find the items in the menus to which they were added and
exactly with the labels used when adding them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 17:13:29 +00:00
Vadim Zeitlin
65571ec7bf Add a beginning of wxMenu unit test.
Test wxMenu and wxMenuBar item search and counting functions.

See #12672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:03:02 +00:00