X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22756322824e8f377b792897209d052ca9281534..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/osx/menuitem_osx.cpp diff --git a/src/osx/menuitem_osx.cpp b/src/osx/menuitem_osx.cpp index ce44dbccbf..93ef505286 100644 --- a/src/osx/menuitem_osx.cpp +++ b/src/osx/menuitem_osx.cpp @@ -41,13 +41,14 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, // In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines // therefore these item must not be translated - if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") ) - m_text = wxT("Quit\tCtrl+Q") ; + if (pParentMenu != NULL && !pParentMenu->GetNoEventsMode()) + if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") ) + m_text = wxT("Quit\tCtrl+Q") ; m_radioGroup.start = -1; m_isRadioGroupStart = false; - wxString text = wxStripMenuCodes(m_text); + wxString text = wxStripMenuCodes(m_text, (pParentMenu != NULL && pParentMenu->GetNoEventsMode()) ? wxStrip_Accel : wxStrip_All); if (text.IsEmpty() && !IsSeparator()) { wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?")); @@ -175,7 +176,7 @@ void wxMenuItem::UpdateItemBitmap() if ( !m_parentMenu ) return; - if ( m_bitmap.Ok() ) + if ( m_bitmap.IsOk() ) { GetPeer()->SetBitmap( m_bitmap ); } @@ -202,7 +203,7 @@ void wxMenuItem::UpdateItemText() if ( !m_parentMenu ) return ; - wxString text = wxStripMenuCodes(m_text); + wxString text = wxStripMenuCodes(m_text, m_parentMenu != NULL && m_parentMenu->GetNoEventsMode() ? wxStrip_Accel : wxStrip_All); if (text.IsEmpty() && !IsSeparator()) { wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));