X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f37907ff76827b0f77f61448abfd0acabf029843..0c2f35dc94a4ae971cd2ed2a0c7464dc79cbc731:/src/motif/radiobut.cpp diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 46906f1a93..4cada5de0e 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -72,9 +72,9 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, wxString label1(wxStripMenuCodes(label)); - XmString text = XmStringCreateSimple ((char*) (const char*) label1); + wxXmString text( label1 ); - XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget)); + WXFontType fontType = m_font.GetFontType(XtDisplay(parentWidget)); Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle", #if wxUSE_GADGETS @@ -82,12 +82,11 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, #else xmToggleButtonWidgetClass, parentWidget, #endif - XmNfontList, fontList, - XmNlabelString, text, + wxFont::GetFontTag(), fontType, + XmNlabelString, text(), XmNfillOnSelect, True, XmNindicatorType, XmONE_OF_MANY, // diamond-shape NULL); - XmStringFree (text); XtAddCallback (radioButtonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxRadioButtonCallback, (XtPointer) this); @@ -96,7 +95,6 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, XtManageChild (radioButtonWidget); - SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); ChangeBackgroundColour(); @@ -162,7 +160,7 @@ void wxRadioButton::ChangeBackgroundColour() wxWindow::ChangeBackgroundColour(); // What colour should this be? - int selectPixel = wxBLACK->AllocColour(wxGetDisplay()); + int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget)); XtVaSetValues ((Widget) GetMainWidget(), XmNselectColor, selectPixel,