If wxGetStockGtkID returns NULL (such as with wx.ID_INDENT on GTK 2.2)
then fall back to normal label setting git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -209,10 +209,8 @@ void wxButton::SetLabel( const wxString &lbl )
|
|||||||
|
|
||||||
wxString label(lbl);
|
wxString label(lbl);
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
|
||||||
if (label.empty() && wxIsStockID(m_windowId))
|
if (label.empty() && wxIsStockID(m_windowId))
|
||||||
label = wxGetStockLabel(m_windowId);
|
label = wxGetStockLabel(m_windowId);
|
||||||
#endif
|
|
||||||
|
|
||||||
wxControl::SetLabel(label);
|
wxControl::SetLabel(label);
|
||||||
|
|
||||||
@@ -224,8 +222,8 @@ void wxButton::SetLabel( const wxString &lbl )
|
|||||||
{
|
{
|
||||||
gtk_button_set_label(GTK_BUTTON(m_widget), stock);
|
gtk_button_set_label(GTK_BUTTON(m_widget), stock);
|
||||||
gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);
|
gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString label2 = PrepareLabelMnemonics(label);
|
wxString label2 = PrepareLabelMnemonics(label);
|
||||||
|
@@ -209,10 +209,8 @@ void wxButton::SetLabel( const wxString &lbl )
|
|||||||
|
|
||||||
wxString label(lbl);
|
wxString label(lbl);
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
|
||||||
if (label.empty() && wxIsStockID(m_windowId))
|
if (label.empty() && wxIsStockID(m_windowId))
|
||||||
label = wxGetStockLabel(m_windowId);
|
label = wxGetStockLabel(m_windowId);
|
||||||
#endif
|
|
||||||
|
|
||||||
wxControl::SetLabel(label);
|
wxControl::SetLabel(label);
|
||||||
|
|
||||||
@@ -224,8 +222,8 @@ void wxButton::SetLabel( const wxString &lbl )
|
|||||||
{
|
{
|
||||||
gtk_button_set_label(GTK_BUTTON(m_widget), stock);
|
gtk_button_set_label(GTK_BUTTON(m_widget), stock);
|
||||||
gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);
|
gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString label2 = PrepareLabelMnemonics(label);
|
wxString label2 = PrepareLabelMnemonics(label);
|
||||||
|
Reference in New Issue
Block a user