X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/187d815255d240350c598721db1e0c1b4d3fb527..72625b36b6fdaea839a5132e8f5d52dea7155bec:/src/xrc/xh_chckl.cpp diff --git a/src/xrc/xh_chckl.cpp b/src/xrc/xh_chckl.cpp index e13a117b5a..c8f853a51e 100644 --- a/src/xrc/xh_chckl.cpp +++ b/src/xrc/xh_chckl.cpp @@ -25,6 +25,8 @@ #include "wx/checklst.h" #endif +#include "wx/xml/xml.h" + IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler) wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() @@ -44,16 +46,8 @@ wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() wxObject *wxCheckListBoxXmlHandler::DoCreateResource() { - if (m_class == wxT("wxCheckListBox") -#if WXWIN_COMPATIBILITY_2_4 - || m_class == wxT("wxCheckList") -#endif - ) + if (m_class == wxT("wxCheckListBox")) { -#if WXWIN_COMPATIBILITY_2_4 - if (m_class == wxT("wxCheckList")) - wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead.")); -#endif // need to build the list of strings from children m_insideBox = true; CreateChildrenPrivately(NULL, GetParamNode(wxT("content"))); @@ -80,9 +74,9 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource() { n = n->GetNext(); continue; } // checking boolean is a bit ugly here (see GetBool() ) - wxString v = n->GetPropVal(wxT("checked"), wxEmptyString); + wxString v = n->GetAttribute(wxT("checked"), wxEmptyString); v.MakeLower(); - if (v && v == wxT("1")) + if (v == wxT("1")) control->Check( i, true ); i++; @@ -112,9 +106,6 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource() bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node) { return (IsOfClass(node, wxT("wxCheckListBox")) || -#if WXWIN_COMPATIBILITY_2_4 - IsOfClass(node, wxT("wxCheckList")) || -#endif (m_insideBox && node->GetName() == wxT("item"))); }