]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
Added wxRichTextTableBlock class to help with table UI operations
[wxWidgets.git] / src / gtk / checkbox.cpp
index 6c21e580a27d6a4dfd9575b0e2fcd108b857c927..af822e1b90cde2ea894dd82aadc3c2a2f7a2bb4d 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/checkbox.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -78,7 +77,7 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
         }
     }
 
-    wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId());
+    wxCommandEvent event(wxEVT_CHECKBOX, cb->GetId());
     event.SetInt(cb->Get3StateValue());
     event.SetEventObject(cb);
     cb->HandleWindowEvent(event);
@@ -91,6 +90,13 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
 
 wxCheckBox::wxCheckBox()
 {
+    m_widgetCheckbox = NULL;
+}
+
+wxCheckBox::~wxCheckBox()
+{
+    if (m_widgetCheckbox && m_widgetCheckbox != m_widget)
+        GTKDisconnect(m_widgetCheckbox);
 }
 
 bool wxCheckBox::Create(wxWindow *parent,