X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da494b405d0826b343ea6d249bbac27061e11d3e..3dfafdb9e6c344ff17e9ec62e1711c9640a48036:/src/motif/checkbox.cpp diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 8d89b52531..927b508123 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "checkbox.h" #endif @@ -61,6 +61,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, xmToggleButtonWidgetClass, parentWidget, wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)), XmNlabelString, text(), + XmNrecomputeSize, False, NULL); XtAddCallback( (Widget)m_mainWidget, @@ -69,7 +70,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE); - SetCanAddEventHandler(TRUE); AttachWidget( parent, m_mainWidget, (WXWidget)NULL, pos.x, pos.y, size.x, size.y ); @@ -121,7 +121,7 @@ void wxCheckBox::ChangeBackgroundColour() XmNforeground, g_itemColors[wxFORE_INDEX].pixel, NULL); - int selectPixel = wxBLACK->AllocColour(wxGetDisplay()); + int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget)); // Better to have the checkbox selection in black, or it's // hard to determine what state it is in.