X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee31c392ac73dcd67fb25ac368e2ffb7d4c9c0e7..eb4642a989aca1aa6c1291a73d43d1247961a234:/src/motif/menu.cpp diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index c02f30d72a..ed12ce6732 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -778,9 +778,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent) 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 @@ -910,21 +908,20 @@ WXWidget wxMenu::CreateMenu (wxMenuBar * menuBar, WXWidget parent, wxMenu * topM 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;