wxString title(m_titles[i]);
menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, TRUE));
- wxStripMenuCodes ((char*) (const char*) title, wxBuffer);
-
- if (strcmp (wxBuffer, "Help") == 0)
+ if (strcmp (wxStripMenuCodes(title), "Help") == 0)
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
// tear off menu support
menu = XmCreatePulldownMenu ((Widget) parent, "pulldown", args, 2);
- XmString label_str = XmStringCreateSimple (wxBuffer);
- buttonWidget = XtVaCreateManagedWidget (wxBuffer,
+ wxString title2(wxStripMenuCodes(title));
+ wxXmString label_str(title2);
+ buttonWidget = XtVaCreateManagedWidget(title2,
#if wxUSE_GADGETS
xmCascadeButtonGadgetClass, (Widget) parent,
#else
xmCascadeButtonWidgetClass, (Widget) parent,
#endif
- XmNlabelString, label_str,
+ XmNlabelString, label_str(),
XmNsubMenuId, menu,
NULL);
if (mnem != 0)
XtVaSetValues (buttonWidget, XmNmnemonic, mnem, NULL);
-
- XmStringFree (label_str);
}
m_menuWidget = (WXWidget) menu;