X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fff16b863c4fb4c92d44d08e91b31e835c904d0..87b621a5b737c09cef079bb4a9ef53be132d2ce0:/src/gtk/checkbox.cpp diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index 977dd37ac8..21c4159d59 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -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, @@ -120,7 +127,7 @@ bool wxCheckBox::Create(wxWindow *parent, m_widgetLabel = gtk_label_new(""); gtk_misc_set_alignment(GTK_MISC(m_widgetLabel), 0.0, 0.5); - m_widget = gtk_hbox_new(FALSE, 0); + m_widget = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(m_widget), m_widgetLabel, FALSE, FALSE, 3); gtk_box_pack_start(GTK_BOX(m_widget), m_widgetCheckbox, FALSE, FALSE, 3);