- bool checkable = GetBool(_T("checkable"));
- p_menu->Append(id, GetText(_T("label")),
- GetText(_T("help")), checkable);
- if (id != -1)
- {
- p_menu->Enable(id, GetBool(_T("enabled"), TRUE));
- if (checkable) p_menu->Check(id, GetBool(_T("checked")));
- }
+ 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, fullLabel,
+ GetText(wxT("help")), checkable);
+
+#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
+ if (HasParam(wxT("bitmap")))
+ mitem->SetBitmap(GetBitmap(wxT("bitmap")));
+#endif
+ p_menu->Append(mitem);
+ mitem->Enable(GetBool(wxT("enabled"), TRUE));
+ if (checkable) mitem->Check(GetBool(wxT("checked")));