1. changed wxControl::GetLabel() to return the originally provided label and
not the one stripped from mnemonics (this was inconsistent with the other ports and resulted in problems when using wxUpdateUIEvent::SetText()) 2. added wxControl::GTKConvertMnemonics(), GTKRemoveMnemonics() and also helper GTKSetLabelForLabel() and GTKSetLabelForFrame() wrappers 3. use them instead of duplicating their code in different derived controls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -198,7 +198,8 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
return false;
|
||||
}
|
||||
|
||||
m_widget = gtk_frame_new( wxGTK_CONV( title ) );
|
||||
m_widget = gtk_frame_new(NULL);
|
||||
SetLabel(title);
|
||||
|
||||
// majorDim may be 0 if all trailing parameters were omitted, so don't
|
||||
// assert here but just use the correct value for it
|
||||
@@ -273,8 +274,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
|
||||
m_parent->DoAddChild( this );
|
||||
|
||||
SetLabel( title );
|
||||
|
||||
PostCreation(size);
|
||||
|
||||
return true;
|
||||
@@ -399,9 +398,7 @@ void wxRadioBox::SetLabel( const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
|
||||
gtk_frame_set_label( GTK_FRAME(m_widget), wxGTK_CONV( wxControl::GetLabel() ) );
|
||||
GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
|
||||
}
|
||||
|
||||
void wxRadioBox::SetString( int item, const wxString& label )
|
||||
|
Reference in New Issue
Block a user