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:
Vadim Zeitlin
2005-12-18 16:37:56 +00:00
parent d1d40c2176
commit b2ff89d648
14 changed files with 398 additions and 330 deletions

View File

@@ -229,14 +229,7 @@ void wxCheckBox::SetLabel( const wxString& label )
{
wxCHECK_RET( m_widgetLabel != NULL, wxT("invalid checkbox") );
wxControl::SetLabel( label );
#ifdef __WXGTK20__
wxString label2 = PrepareLabelMnemonics( label );
gtk_label_set_text_with_mnemonic( GTK_LABEL(m_widgetLabel), wxGTK_CONV( label2 ) );
#else
gtk_label_set( GTK_LABEL(m_widgetLabel), wxGTK_CONV( GetLabel() ) );
#endif
GTKSetLabelForLabel(GTK_LABEL(m_widgetLabel), label);
}
bool wxCheckBox::Enable( bool enable )