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

@@ -56,9 +56,8 @@ bool wxStaticBox::Create( wxWindow *parent,
return FALSE;
}
wxControl::SetLabel(label);
m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
m_widget = gtk_frame_new(NULL);
SetLabel(label);
m_parent->DoAddChild( this );
@@ -79,12 +78,11 @@ bool wxStaticBox::Create( wxWindow *parent,
return TRUE;
}
void wxStaticBox::SetLabel( const wxString &label )
void wxStaticBox::SetLabel( const wxString& label )
{
wxControl::SetLabel( label );
wxCHECK_RET( m_widget != NULL, wxT("invalid staticbox") );
gtk_frame_set_label( GTK_FRAME( m_widget ),
m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
}
void wxStaticBox::DoApplyWidgetStyle(GtkRcStyle *style)