From: David Webster Date: Tue, 21 Mar 2000 13:39:23 +0000 (+0000) Subject: Settle on one shortcut key utility proc. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d92a1d4f5af5a1278bcd54cb7d61b11fb6fec2b0 Settle on one shortcut key utility proc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 3ab6173a4b..24f4846a87 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -324,7 +324,6 @@ bool wxMenu::DoInsertOrAppend( // // Menu is just a normal string (passed in data parameter) // - wxSetShortCutKey((wxChar*)pItem->GetText().c_str()); vItem.afStyle |= MIS_TEXT; pData = (char*)pItem->GetText().c_str(); } @@ -913,8 +912,6 @@ bool wxMenuBar::Append( wxCHECK_MSG(hSubmenu, FALSE, wxT("can't append invalid menu to menubar")); - wxSetShortCutKey((wxChar*)rTitle.c_str()); - wxString Title = TextToLabel(rTitle); if (!wxMenuBarBase::Append(pMenu, Title)) return FALSE; @@ -1074,23 +1071,4 @@ wxMenuItem* wxMenuBar::FindItem( return pItem; } // end of wxMenuBar::FindItem -// -// wxWindows' default shortcut identifier is WIN32's "&" but -// OS2's is "~" so we have to change this and must watch for the -// sequence, "&&" converting only the first one -// -void wxSetShortCutKey( - wxChar* zText -) -{ - for (int i = 0; zText[i] != '\0'; i++) - { - if (zText[i] == '&') - { - zText[i] = '~'; - if (zText[i+1] == '&') - i++; - } - } -}