X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..5541d1fda4b73af86e42b2f43724f0c063a352d0:/src/os2/menuitem.cpp diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index 1d960c605b..761e549f2c 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -62,7 +62,7 @@ static wxString TextToLabel(const wxString& rTitle) { wxString Title; const wxChar *pc; - for (pc = rTitle; *pc != wxT('\0'); pc++ ) + for (pc = rTitle.c_str(); *pc != wxT('\0'); pc++ ) { if (*pc == wxT('&') ) { @@ -71,13 +71,9 @@ static wxString TextToLabel(const wxString& rTitle) pc++; Title << wxT('&'); } - else + else Title << wxT('~'); } -// else if (*pc == wxT('/')) -// { -// Title << wxT('\\'); -// } else { if ( *pc == wxT('~') ) @@ -100,11 +96,7 @@ static wxString TextToLabel(const wxString& rTitle) // dynamic classes implementation // ---------------------------------------------------------------------------- - #if wxUSE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS2(wxMenuItem, wxMenuItemBase, wxOwnerDrawn) - #else //!USE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxMenuItemBase) - #endif //USE_OWNER_DRAWN +IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) // ---------------------------------------------------------------------------- // wxMenuItem @@ -134,7 +126,7 @@ wxMenuItem::wxMenuItem( // // Set default menu colors // - #define SYS_COLOR(c) (wxSystemSettings::GetSystemColour(wxSYS_COLOUR_##c)) + #define SYS_COLOR(c) (wxSystemSettings::GetColour(wxSYS_COLOUR_##c)) SetTextColour(SYS_COLOR(MENUTEXT)); SetBackgroundColour(SYS_COLOR(MENU)); @@ -208,18 +200,6 @@ wxString wxMenuItemBase::GetLabelFromText( return label; } -// accelerators -// ------------ - -#if wxUSE_ACCEL - -wxAcceleratorEntry *wxMenuItem::GetAccel() const -{ - return wxGetAccelFromString(GetText()); -} - -#endif // wxUSE_ACCEL - // change item state // -----------------