X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9a7fde5683162aeeb76a364456b10b9f7c8c555..32eec436ed2ed090910c44326cc91389a75fa1f2:/src/gtk/radiobut.cpp diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index 93e92becbb..9cb0c7fe16 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -47,8 +47,6 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r // wxRadioButton //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton,wxControl) - bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& label, @@ -101,6 +99,9 @@ void wxRadioButton::SetLabel( const wxString& label ) { wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") ); + // save the original label + wxControlBase::SetLabel(label); + GTKSetLabelForLabel(GTK_LABEL(GTK_BIN(m_widget)->child), label); } @@ -138,11 +139,14 @@ bool wxRadioButton::GetValue() const bool wxRadioButton::Enable( bool enable ) { - if ( !wxControl::Enable( enable ) ) + if (!base_type::Enable(enable)) return false; gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable); + if (enable) + GTKFixSensitivity(); + return true; }