X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab708d5defa637ac6f284f94acb706d13cd15eb1..00b2a5df9502adfd9a14ce01ab603f7906984995:/contrib/src/xml/xh_menu.cpp diff --git a/contrib/src/xml/xh_menu.cpp b/contrib/src/xml/xh_menu.cpp index 0550600690..0b42642ed4 100644 --- a/contrib/src/xml/xh_menu.cpp +++ b/contrib/src/xml/xh_menu.cpp @@ -38,7 +38,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource() wxMenu *menu = new wxMenu(GetStyle()); wxString title = GetText(wxT("label")); wxString help = GetText(wxT("help")); - + bool oldins = m_insideMenu; m_insideMenu = TRUE; CreateChildren(menu, TRUE/*only this handler*/); @@ -69,8 +69,13 @@ wxObject *wxMenuXmlHandler::DoCreateResource() { int id = GetID(); bool checkable = GetBool(wxT("checkable")); + wxString label = GetText(wxT("label")); + wxString accel = GetText(wxT("accel")); + wxString fullLabel = label; + if (!accel.IsEmpty()) + fullLabel << wxT("\t") << accel; - wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(wxT("label")), + wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel, GetText(wxT("help")), checkable); #if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)