]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
make sure we are comparing the stripped strings
[wxWidgets.git] / src / gtk / checkbox.cpp
index 4099d8406f62075c4a024a3a2c1528419e898585..2a7d0437bf6b44c4c240e42a8f7ca642c2b22e0f 100644 (file)
@@ -8,10 +8,13 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "checkbox.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #if wxUSE_CHECKBOX
@@ -118,8 +121,7 @@ bool wxCheckBox::Create(wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation();
-
-    SetFont( parent->GetFont() );
+    InheritAttributes();
 
     wxSize size_best( DoGetBestSize() );
     wxSize new_size( size );
@@ -130,9 +132,6 @@ bool wxCheckBox::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;
@@ -220,8 +219,8 @@ void wxCheckBox::OnInternalIdle()
         }
     }
     
-    if (wxUpdateUIEvent::CanUpdate())
-        UpdateWindowUI();
+    if (wxUpdateUIEvent::CanUpdate(this))
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
 wxSize wxCheckBox::DoGetBestSize() const