]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_chckl.cpp
regenerated makefiles, with support for multilib build
[wxWidgets.git] / contrib / src / xrc / xh_chckl.cpp
index 24e191e830dec1dfac86157c27ed0eaec279c7a0..fb8c71ad34599ef012850b166537c258ec8df2d8 100644 (file)
     #pragma hdrstop
 #endif
 
+#if wxUSE_OWNER_DRAWN || !defined(__WXMSW__)
+
 #include "wx/xrc/xh_chckl.h"
 #include "wx/checklst.h"
 #include "wx/intl.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxCheckListXmlHandler, wxXmlResourceHandler)
+
 wxCheckListXmlHandler::wxCheckListXmlHandler() 
 : wxXmlResourceHandler(), m_insideBox(FALSE)
 {
@@ -91,7 +95,10 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
         // handle <item checked="boolean">Label</item>
 
         // add to the list
-        strList.Add(wxGetTranslation(GetNodeContent(m_node)));
+        wxString str = GetNodeContent(m_node);
+        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+            str = wxGetTranslation(str);
+        strList.Add(str);
         return NULL;
     }
 }
@@ -102,4 +109,5 @@ bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node)
            (m_insideBox && node->GetName() == wxT("item")));
 }
 
+#endif