Applied patch #840617 from Ian Brown:
"motif 2.4.2, menu codes in static text" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,14 +97,8 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // gcc 2.95 doesn't like this apparently
|
wxString buf(wxStripMenuCodes(label));
|
||||||
// Use XmStringCreateLtoR(), since XmStringCreateSimple
|
wxXmString label_str(buf);
|
||||||
// doesn't obey separators.
|
|
||||||
// XmString text = XmStringCreateSimple (label1);
|
|
||||||
XmString text = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET);
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
XmString text = XmStringCreateLtoR ((char *)(const char*)label, XmSTRING_DEFAULT_CHARSET);
|
|
||||||
|
|
||||||
XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
|
XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
@@ -112,15 +106,13 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
xmLabelWidgetClass,
|
xmLabelWidgetClass,
|
||||||
borderWidget ? borderWidget : parentWidget,
|
borderWidget ? borderWidget : parentWidget,
|
||||||
XmNfontList, fontList,
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, label_str(),
|
||||||
XmNalignment,
|
XmNalignment,
|
||||||
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
|
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
|
||||||
((style & wxALIGN_CENTRE) ? XmALIGNMENT_CENTER :
|
((style & wxALIGN_CENTRE) ? XmALIGNMENT_CENTER :
|
||||||
XmALIGNMENT_BEGINNING)),
|
XmALIGNMENT_BEGINNING)),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
XmStringFree (text);
|
|
||||||
|
|
||||||
m_mainWidget = borderWidget ? borderWidget : m_labelWidget;
|
m_mainWidget = borderWidget ? borderWidget : m_labelWidget;
|
||||||
|
|
||||||
SetCanAddEventHandler(TRUE);
|
SetCanAddEventHandler(TRUE);
|
||||||
|
Reference in New Issue
Block a user