X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b4f3c9f768c91d1927c263f5db644cc16fca0b9..c3b0c2c3dc1e2a76af69082f63149174525d97d5:/src/gtk/radiobut.cpp diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index c523b49eef..a3b09060d5 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -118,7 +118,7 @@ bool wxRadioButton::Create( wxWindow *parent, } } - m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, label.mbc_str() ); + m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, wxGTK_CONV( label ) ); SetLabel(label); @@ -154,7 +154,12 @@ void wxRadioButton::SetLabel( const wxString& label ) wxControl::SetLabel( label ); GtkLabel *g_label = GTK_LABEL( BUTTON_CHILD(m_widget) ); - gtk_label_set( g_label, GetLabel().mbc_str() ); +#ifdef __WXGTK20__ + wxString label2 = PrepareLabelMnemonics( label ); + gtk_label_set_text_with_mnemonic( g_label, wxGTK_CONV( label2 ) ); +#else + gtk_label_set( g_label, wxGTK_CONV( GetLabel() ) ); +#endif } void wxRadioButton::SetValue( bool val ) @@ -234,7 +239,8 @@ void wxRadioButton::OnInternalIdle() } } - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate()) + UpdateWindowUI(); } wxSize wxRadioButton::DoGetBestSize() const