X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f6e622f7c5323919c93c2da62bfb7156442b3a0..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/xrc/xh_tglbtn.cpp?ds=sidebyside diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 30def16e25..7d2e1cb945 100644 --- a/src/xrc/xh_tglbtn.cpp +++ b/src/xrc/xh_tglbtn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_tglbtn.cpp +// Name: src/xrc/xh_tglbtn.cpp // Purpose: XRC resource for wxToggleButton // Author: Bob Mitchell // Created: 2000/03/21 @@ -36,7 +36,7 @@ wxObject *wxToggleButtonXmlHandler::DoCreateResource() wxObject *control = m_instance; -#if !defined(__WXUNIVERSAL__) && !defined(__WXMOTIF__) && !defined(__WXPALMOS__) && !defined(__WXPM__) +#if !defined(__WXUNIVERSAL__) && !defined(__WXMOTIF__) && !defined(__WXPM__) && !(defined(__WXGTK__) && !defined(__WXGTK20__)) if (m_class == wxT("wxBitmapToggleButton")) { @@ -71,15 +71,9 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control) { wxToggleButton *button = wxDynamicCast(control, wxToggleButton); - wxString label = GetText(wxT("label")); - button->Create(m_parentAsWindow, GetID(), -#if defined(__WXUNIVERSAL__) - !label.empty() ? label : GetBitmap(wxT("bitmap"), wxART_BUTTON), -#else - label, -#endif + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, @@ -88,6 +82,7 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control) button->SetValue(GetBool( wxT("checked"))); } +#if !defined(__WXUNIVERSAL__) && !defined(__WXMOTIF__) && !defined(__WXPM__) && !(defined(__WXGTK__) && !defined(__WXGTK20__)) void wxToggleButtonXmlHandler::DoCreateBitmapToggleButton(wxObject *control) { wxBitmapToggleButton *button = wxDynamicCast(control, wxBitmapToggleButton); @@ -102,5 +97,5 @@ void wxToggleButtonXmlHandler::DoCreateBitmapToggleButton(wxObject *control) button->SetValue(GetBool( wxT("checked"))); } - +#endif #endif // wxUSE_XRC && wxUSE_TOGGLEBTN