X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b30bb0bda00908650d46b326ba04237f0d4121f..e94e2e952b3bde7f2d456e10a12589a80185407d:/src/gtk1/radiobut.cpp diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index a3b09060d5..c8c6c53eca 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -8,11 +8,12 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "radiobut.h" #endif -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_RADIOBOX @@ -94,7 +95,7 @@ bool wxRadioButton::Create( wxWindow *parent, { // search backward for last group start wxRadioButton *chief = (wxRadioButton*) NULL; - wxWindowList::Node *node = parent->GetChildren().GetLast(); + wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { wxWindow *child = node->GetData(); @@ -128,8 +129,7 @@ bool wxRadioButton::Create( wxWindow *parent, m_parent->DoAddChild( this ); PostCreation(); - - SetFont( parent->GetFont() ); + InheritAttributes(); wxSize size_best( DoGetBestSize() ); wxSize new_size( size ); @@ -140,9 +140,6 @@ bool wxRadioButton::Create( wxWindow *parent, if ((new_size.x != size.x) || (new_size.y != size.y)) SetSize( new_size.x, new_size.y ); - SetBackgroundColour( parent->GetBackgroundColour() ); - SetForegroundColour( parent->GetForegroundColour() ); - Show( TRUE ); return TRUE; @@ -239,8 +236,8 @@ void wxRadioButton::OnInternalIdle() } } - if (wxUpdateUIEvent::CanUpdate()) - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } wxSize wxRadioButton::DoGetBestSize() const