X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1897abe1d8ac5e9575f4c9a589ea7ce08189506a..185ac7cbbb881b3edb44d0e594bc6be4991baaae:/src/gtk/checkbox.cpp diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index 6c21e580a2..8c1c45257a 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -78,7 +78,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 +91,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,