X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f6e622f7c5323919c93c2da62bfb7156442b3a0..90e10cd1bedc5cac1ce1b5331d6fd2a351014cfa:/src/xrc/xh_tglbtn.cpp?ds=inline diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 30def16e25..be031f7565 100644 --- a/src/xrc/xh_tglbtn.cpp +++ b/src/xrc/xh_tglbtn.cpp @@ -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