X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fab591c5cceff41c0bedaa89af34cd039e2c44e1..96d5885406245ea36b7cfb2722c0e9f12b7dd1aa:/src/gtk1/radiobut.cpp?ds=sidebyside diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index fad83bc1b1..e79978e8b7 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -8,11 +8,12 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "radiobut.h" #endif -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_RADIOBOX @@ -94,7 +95,7 @@ bool wxRadioButton::Create( wxWindow *parent, { // search backward for last group start wxRadioButton *chief = (wxRadioButton*) NULL; - wxWindowList::Node *node = parent->GetChildren().GetLast(); + wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { wxWindow *child = node->GetData(); @@ -154,7 +155,12 @@ void wxRadioButton::SetLabel( const wxString& label ) wxControl::SetLabel( label ); GtkLabel *g_label = GTK_LABEL( BUTTON_CHILD(m_widget) ); +#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 +240,8 @@ void wxRadioButton::OnInternalIdle() } } - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } wxSize wxRadioButton::DoGetBestSize() const