X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f6e622f7c5323919c93c2da62bfb7156442b3a0..00b89a1d1da61a1f842db63b244ad08c0554121c:/src/xrc/xh_tglbtn.cpp diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 30def16e25..62cb16edb1 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(__WXPALMOS__) && !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(__WXPALMOS__) && !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