Fix crash on exit with Lesstif (and possibly Motif 1.x).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2005-06-19 19:11:21 +00:00
parent 3550706df7
commit 7360894949
12 changed files with 100 additions and 77 deletions

View File

@@ -51,18 +51,17 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
Widget borderWidget =
(Widget) wxCreateBorderWidget( (WXWidget)parentWidget, style );
wxXmString text( wxStripMenuCodes( label ) );
WXFontType fontType = m_font.GetFontType(XtDisplay(parentWidget));
m_labelWidget = XtVaCreateManagedWidget (wxConstCast(name.c_str(), char),
xmLabelWidgetClass,
borderWidget ? borderWidget : parentWidget,
wxFont::GetFontTag(), fontType,
XmNlabelString, text(),
XmNalignment,
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
((style & wxALIGN_CENTRE) ? XmALIGNMENT_CENTER :
XmALIGNMENT_BEGINNING)),
NULL);
m_labelWidget =
XtVaCreateManagedWidget (wxConstCast(name.c_str(), char),
xmLabelWidgetClass,
borderWidget ? borderWidget : parentWidget,
wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
XmNlabelString, text(),
XmNalignment, ((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
((style & wxALIGN_CENTRE) ? XmALIGNMENT_CENTER :
XmALIGNMENT_BEGINNING)),
NULL);
m_mainWidget = borderWidget ? borderWidget : m_labelWidget;