X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b33b72819002e038a2a0cb2b3aa9b2cde880c7a..8f974c520a8733158591891458fda10fae4c3950:/src/os2/menuitem.cpp diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index af97aab35a..16ea72e6a0 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -71,7 +71,7 @@ static wxString TextToLabel(const wxString& rTitle) pc++; Title << wxT('&'); } - else + else Title << wxT('~'); } // else if (*pc == wxT('/')) @@ -155,6 +155,8 @@ wxMenuItem::wxMenuItem( m_text = TextToLabel(rText); m_isCheckable = bCheckable; m_help = rStrHelp; + memset(&m_vMenuData, '\0', sizeof(m_vMenuData)); + m_vMenuData.id= nId; } // end of wxMenuItem::wxMenuItem wxMenuItem::~wxMenuItem() @@ -206,18 +208,6 @@ wxString wxMenuItemBase::GetLabelFromText( return label; } -// accelerators -// ------------ - -#if wxUSE_ACCEL - -wxAcceleratorEntry *wxMenuItem::GetAccel() const -{ - return wxGetAccelFromString(GetText()); -} - -#endif // wxUSE_ACCEL - // change item state // ----------------- @@ -233,13 +223,13 @@ void wxMenuItem::Enable( bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) + ,MPFROM2SHORT(MIA_DISABLED, FALSE) ); else bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, FALSE) + ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) ); if (!bOk) { @@ -271,7 +261,7 @@ void wxMenuItem::Check( ); if (!bOk) { - wxLogLastError("EnableMenuItem"); + wxLogLastError("CheckMenuItem"); } wxMenuItemBase::Check(bCheck); } // end of wxMenuItem::Check