]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menuitem.cpp
Modified vc.t according to last changes to makefile.vc, and regenerated
[wxWidgets.git] / src / msw / menuitem.cpp
index 6e450bc97391806cd45b682bc7703ce827cb39f1..74a82794def96dfb00c6e6c9cb3b1a9d60f8fed0 100644 (file)
@@ -89,7 +89,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
                        wxMenu *pSubMenu)
           : wxMenuItemBase(pParentMenu, id, text, strHelp, kind, pSubMenu)
 #if wxUSE_OWNER_DRAWN
                        wxMenu *pSubMenu)
           : wxMenuItemBase(pParentMenu, id, text, strHelp, kind, pSubMenu)
 #if wxUSE_OWNER_DRAWN
-            , wxOwnerDrawn(GetLabelFromText(text), kind == wxITEM_CHECK)
+            , wxOwnerDrawn(text, kind == wxITEM_CHECK)
 #endif // owner drawn
 {
     Init();
 #endif // owner drawn
 {
     Init();
@@ -104,7 +104,7 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu,
           : wxMenuItemBase(parentMenu, id, text, help,
                            isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
 #if wxUSE_OWNER_DRAWN
           : wxMenuItemBase(parentMenu, id, text, help,
                            isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
 #if wxUSE_OWNER_DRAWN
-            , wxOwnerDrawn(GetLabelFromText(text), isCheckable)
+           , wxOwnerDrawn(text, isCheckable)
 #endif // owner drawn
 {
     Init();
 #endif // owner drawn
 {
     Init();
@@ -300,6 +300,10 @@ void wxMenuItem::SetText(const wxString& text)
 
     wxMenuItemBase::SetText(text);
     OWNER_DRAWN_ONLY( wxOwnerDrawn::SetName(text) );
 
     wxMenuItemBase::SetText(text);
     OWNER_DRAWN_ONLY( wxOwnerDrawn::SetName(text) );
+#if wxUSE_OWNER_DRAWN
+    // tell the owner drawing code to to show the accel string as well
+    SetAccelString(text.AfterFirst(_T('\t')));
+#endif
 
     HMENU hMenu = GetHMenuOf(m_parentMenu);
     wxCHECK_RET( hMenu, wxT("menuitem without menu") );
 
     HMENU hMenu = GetHMenuOf(m_parentMenu);
     wxCHECK_RET( hMenu, wxT("menuitem without menu") );