]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
More for wxPython 2.0b9 (hopefully the last...)
[wxWidgets.git] / src / gtk / checkbox.cpp
index d4023c5a042a644fd5a283f69c3f6025988538dc..1811807ab04ac7992f496d892926ccdf5474c85c 100644 (file)
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
 
+//-----------------------------------------------------------------------------
+// idle system
+//-----------------------------------------------------------------------------
+
+extern void wxapp_install_idle_handler();
+extern bool g_isIdle;
+
 //-----------------------------------------------------------------------------
 // data
 //-----------------------------------------------------------------------------
@@ -29,6 +36,8 @@ extern bool   g_blockEventsOnDrag;
 
 static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckBox *cb )
 {
+    if (g_isIdle) wxapp_install_idle_handler();
+
     if (!cb->HasVMT()) return;
 
     if (cb->m_blockFirstEvent)
@@ -121,9 +130,6 @@ bool wxCheckBox::Create(wxWindow *parent,
 
     PostCreation();
 
-    gtk_widget_realize( m_widgetLabel );
-    gtk_widget_realize( m_widgetCheckbox );
-
     SetBackgroundColour( parent->GetBackgroundColour() );
     SetForegroundColour( parent->GetForegroundColour() );
     SetFont( parent->GetFont() );