]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/radiobox.cpp
initialize the font fields properly when it corresponds to a native font
[wxWidgets.git] / src / motif / radiobox.cpp
index 6659d3d324a9701d56e8c2b683a7fd9ca3cd5f93..365fe2b3360af51fdf576b29b8f9137c91eb007e 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "radiobox.h"
 #endif
 
@@ -168,7 +168,6 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     XtManageChild (radioBoxWidget);
     XtManageChild ((Widget)m_mainWidget);
 
-    SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
 
     ChangeBackgroundColour();
@@ -378,14 +377,14 @@ void wxRadioBox::ChangeBackgroundColour()
 {
     wxWindow::ChangeBackgroundColour();
 
-    int selectPixel = wxBLACK->AllocColour(wxGetDisplay());
+    int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget));
 
     int i;
     for (i = 0; i < m_noItems; i++)
     {
         WXWidget radioButton = m_radioButtons[i];
 
-        DoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
+        wxDoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
 
         XtVaSetValues ((Widget) radioButton,
           XmNselectColor, selectPixel,
@@ -402,7 +401,7 @@ void wxRadioBox::ChangeForegroundColour()
     {
         WXWidget radioButton = m_radioButtons[i];
 
-        DoChangeForegroundColour(radioButton, m_foregroundColour);
+        wxDoChangeForegroundColour(radioButton, m_foregroundColour);
     }
 }