From 7c4878b682c28dc0d49a6b2f9d35f15502709018 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 6 May 2001 22:22:03 +0000 Subject: [PATCH] added attribute to wxMenuItem git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xml/xh_menu.cpp | 9 +++++++-- contrib/utils/wxrcedit/df/wxMenuItem.df | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) 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__) diff --git a/contrib/utils/wxrcedit/df/wxMenuItem.df b/contrib/utils/wxrcedit/df/wxMenuItem.df index 387bf851a5..242c48cf1b 100644 --- a/contrib/utils/wxrcedit/df/wxMenuItem.df +++ b/contrib/utils/wxrcedit/df/wxMenuItem.df @@ -2,6 +2,7 @@ node wxMenuItem type normal icon 0 var label of text +var accel of text var help of text var checkable of bool var checked of bool -- 2.45.2