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:
Robin Dunn
2004-09-01 23:22:47 +00:00
parent 7bc1e663f3
commit b04683b19e
2 changed files with 2 additions and 6 deletions

View File

@@ -209,10 +209,8 @@ void wxButton::SetLabel( const wxString &lbl )
wxString label(lbl);
#ifndef __WXGTK20__
if (label.empty() && wxIsStockID(m_windowId))
label = wxGetStockLabel(m_windowId);
#endif
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_use_stock(GTK_BUTTON(m_widget), TRUE);
return;
}
return;
}
wxString label2 = PrepareLabelMnemonics(label);