added enabled and hidden attributes to radio box items in XRC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-02 18:21:38 +00:00
parent 8a18ea3f03
commit 8758875e0b
8 changed files with 110 additions and 83 deletions

View File

@@ -1031,13 +1031,17 @@ wxString wxXmlResourceHandler::GetName()
bool wxXmlResourceHandler::GetBoolAttr(const wxString& attr, bool defaultv)
{
wxString v;
return m_node->GetAttribute(attr, &v) ? v == '1' : defaultv;
}
bool wxXmlResourceHandler::GetBool(const wxString& param, bool defaultv)
{
wxString v = GetParamValue(param);
v.MakeLower();
if (!v) return defaultv;
const wxString v = GetParamValue(param);
return (v == wxT("1"));
return v.empty() ? defaultv : (v == '1');
}