]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
added wxLocale::Init() and ctor without arguments for convenience
[wxWidgets.git] / src / gtk / checkbox.cpp
index ee3830f361e7a015f5d53043190bf44fb1630942..42c8b4167a52b4acf3df37a2774903342cc68b2b 100644 (file)
 
 #include "wx/checkbox.h"
 
+//-----------------------------------------------------------------------------
+// data
+//-----------------------------------------------------------------------------
+
+extern bool   g_blockEventsOnDrag;
+
 //-----------------------------------------------------------------------------
 // wxCheckBox
 //-----------------------------------------------------------------------------
 
-void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), gpointer data )
+static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckBox *cb )
 {
-  wxCheckBox *cb = (wxCheckBox*)data;
+  if (!cb->HasVMT()) return;
+  if (g_blockEventsOnDrag) return;
+  
   wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId());
   event.SetInt( cb->GetValue() );
   event.SetEventObject(cb);
-  cb->ProcessEvent(event);
+  cb->GetEventHandler()->ProcessEvent(event);
 };
 
 //-----------------------------------------------------------------------------