Don't call base class SetLabel() from GTKSetLabelForLabel().
Calling wxControlBase::SetLabel() only from GTKSetLabelForLabel() made its behaviour inconsistent with GTKSetLabelWithMarkupForLabel() and also was redundant in all but two places from which it was called, so remove this call from this function itself and instead add it to its callers where it's really needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -123,9 +123,6 @@ void wxControl::GTKFixSensitivity(bool onlyIfUnderMouse)
|
||||
|
||||
void wxControl::GTKSetLabelForLabel(GtkLabel *w, const wxString& label)
|
||||
{
|
||||
// save the original label
|
||||
wxControlBase::SetLabel(label);
|
||||
|
||||
const wxString labelGTK = GTKConvertMnemonics(label);
|
||||
gtk_label_set_text_with_mnemonic(w, wxGTK_CONV(labelGTK));
|
||||
}
|
||||
@@ -160,6 +157,8 @@ GtkWidget* wxControl::GTKCreateFrame(const wxString& label)
|
||||
|
||||
void wxControl::GTKSetLabelForFrame(GtkFrame *w, const wxString& label)
|
||||
{
|
||||
wxControlBase::SetLabel(label);
|
||||
|
||||
GtkLabel* labelwidget = GTK_LABEL(gtk_frame_get_label_widget(w));
|
||||
GTKSetLabelForLabel(labelwidget, label);
|
||||
}
|
||||
|
@@ -99,6 +99,9 @@ void wxRadioButton::SetLabel( const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") );
|
||||
|
||||
// save the original label
|
||||
wxControlBase::SetLabel(label);
|
||||
|
||||
GTKSetLabelForLabel(GTK_LABEL(GTK_BIN(m_widget)->child), label);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user