]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_combo.cpp
make it possible to not attach toolbars to frames (John Anderson)
[wxWidgets.git] / contrib / src / xrc / xh_combo.cpp
index daeb0d70f7688ec84349254bee601df83f74a321..03fa009eb4923ca3c4bb45b09eb6bf281f4e6cb5 100644 (file)
 
 #include "wx/xrc/xh_combo.h"
 #include "wx/combobox.h"
 
 #include "wx/xrc/xh_combo.h"
 #include "wx/combobox.h"
+#include "wx/intl.h"
 
 #if wxUSE_COMBOBOX
 
 
 #if wxUSE_COMBOBOX
 
+IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)
+
 wxComboBoxXmlHandler::wxComboBoxXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
 {
 wxComboBoxXmlHandler::wxComboBoxXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
 {
@@ -82,7 +85,10 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
         // handle <item>Label</item>
 
         // add to the list
         // handle <item>Label</item>
 
         // add to the list
-        strList.Add(GetNodeContent(m_node));
+        wxString str = GetNodeContent(m_node);
+        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+            str = wxGetTranslation(str);
+        strList.Add(str);
 
         return NULL;
     }
 
         return NULL;
     }