X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/404aba09e585de231b85eb2422bdd3bdc6318535..e28cc3ca0aa9bb1c7e9613c447ca94b13a8bc858:/src/os2/menu.cpp diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 7f693d4d2d..73b5a56cfa 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -55,9 +55,6 @@ USHORT wxMenu::m_nextMenuId = 0; // macros // ---------------------------------------------------------------------------- - IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) - IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) - // ============================================================================ // implementation // ============================================================================ @@ -201,7 +198,7 @@ void wxMenu::UpdateAccel( // // Find the (new) accel for this item // - wxAcceleratorEntry* pAccel = wxAcceleratorEntry::Create(pItem->GetText()); + wxAcceleratorEntry* pAccel = wxAcceleratorEntry::Create(pItem->GetItemLabel()); if (pAccel) pAccel->m_command = pItem->GetId(); @@ -323,7 +320,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem, // rItem.afStyle |= MIS_TEXT; } - pData = (char*) pItem->GetText().wx_str(); + pData = (char*) pItem->GetItemLabel().wx_str(); } if (nPos == (size_t)-1) @@ -387,7 +384,7 @@ void wxMenu::EndRadioGroup() wxMenuItem* wxMenu::DoAppend( wxMenuItem* pItem ) { - wxCHECK_MSG( pItem, NULL, _T("NULL item in wxMenu::DoAppend") ); + wxCHECK_MSG( pItem, NULL, wxT("NULL item in wxMenu::DoAppend") ); bool bCheck = false; @@ -428,7 +425,7 @@ wxMenuItem* wxMenu::DoAppend( wxMenuItem* pItem ) } else { - wxFAIL_MSG( _T("where is the radio group start item?") ); + wxFAIL_MSG( wxT("where is the radio group start item?") ); } } } @@ -847,7 +844,7 @@ void wxMenuBar::EnableTop( Refresh(); } // end of wxMenuBar::EnableTop -void wxMenuBar::SetLabelTop( +void wxMenuBar::SetMenuLabel( size_t nPos , const wxString& rLabel ) @@ -884,16 +881,16 @@ void wxMenuBar::SetLabelTop( wxLogLastError(wxT("ModifyMenu")); } Refresh(); -} // end of wxMenuBar::SetLabelTop +} // end of wxMenuBar::SetMenuLabel -wxString wxMenuBar::GetLabelTop( +wxString wxMenuBar::GetMenuLabel( size_t nPos ) const { wxCHECK_MSG( nPos < GetMenuCount(), wxEmptyString, - wxT("invalid menu index in wxMenuBar::GetLabelTop") ); + wxT("invalid menu index in wxMenuBar::GetMenuLabel") ); return m_titles[nPos]; -} // end of wxMenuBar::GetLabelTop +} // end of wxMenuBar::GetMenuLabel // --------------------------------------------------------------------------- // wxMenuBar construction @@ -1097,7 +1094,9 @@ void wxMenuBar::Attach( ,m_vAccelTable.GetHACCEL() ,(HWND)pFrame->GetFrame() )) + { wxLogLastError(wxT("WinSetAccelTable")); + } #endif // wxUSE_ACCEL } // end of wxMenuBar::Attach