diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h
index 4e539a17c5..0962b297aa 100644
--- a/contrib/include/wx/xrc/xmlres.h
+++ b/contrib/include/wx/xrc/xmlres.h
@@ -215,6 +215,9 @@ public:
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
static wxXmlResource *Set(wxXmlResource *res);
+ // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
+ int GetFlags() { return m_flags; }
+
protected:
// Scans the resources list for unloaded files and loads them. Also reloads
// files that have been modified since last loading.
@@ -229,9 +232,6 @@ protected:
// Creates a resource from information in the given node.
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
- // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
- int GetFlags() { return m_flags; }
-
private:
long m_version;
diff --git a/contrib/src/xrc/xh_chckl.cpp b/contrib/src/xrc/xh_chckl.cpp
index 24e191e830..408c02570d 100644
--- a/contrib/src/xrc/xh_chckl.cpp
+++ b/contrib/src/xrc/xh_chckl.cpp
@@ -91,7 +91,10 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
}
diff --git a/contrib/src/xrc/xh_choic.cpp b/contrib/src/xrc/xh_choic.cpp
index 2f91e382a8..f2dd0bdb43 100644
--- a/contrib/src/xrc/xh_choic.cpp
+++ b/contrib/src/xrc/xh_choic.cpp
@@ -77,7 +77,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/contrib/src/xrc/xh_combo.cpp b/contrib/src/xrc/xh_combo.cpp
index 3d708c3a49..2a17231c4f 100644
--- a/contrib/src/xrc/xh_combo.cpp
+++ b/contrib/src/xrc/xh_combo.cpp
@@ -83,7 +83,10 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/contrib/src/xrc/xh_listb.cpp b/contrib/src/xrc/xh_listb.cpp
index 50790fbb34..c3c9004d3f 100644
--- a/contrib/src/xrc/xh_listb.cpp
+++ b/contrib/src/xrc/xh_listb.cpp
@@ -83,7 +83,10 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/contrib/src/xrc/xh_radbx.cpp b/contrib/src/xrc/xh_radbx.cpp
index 6ba0e86182..f2f229cd9c 100644
--- a/contrib/src/xrc/xh_radbx.cpp
+++ b/contrib/src/xrc/xh_radbx.cpp
@@ -84,7 +84,10 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h
index 4e539a17c5..0962b297aa 100644
--- a/include/wx/xrc/xmlres.h
+++ b/include/wx/xrc/xmlres.h
@@ -215,6 +215,9 @@ public:
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
static wxXmlResource *Set(wxXmlResource *res);
+ // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
+ int GetFlags() { return m_flags; }
+
protected:
// Scans the resources list for unloaded files and loads them. Also reloads
// files that have been modified since last loading.
@@ -229,9 +232,6 @@ protected:
// Creates a resource from information in the given node.
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
- // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
- int GetFlags() { return m_flags; }
-
private:
long m_version;
diff --git a/src/xrc/xh_chckl.cpp b/src/xrc/xh_chckl.cpp
index 24e191e830..408c02570d 100644
--- a/src/xrc/xh_chckl.cpp
+++ b/src/xrc/xh_chckl.cpp
@@ -91,7 +91,10 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
}
diff --git a/src/xrc/xh_choic.cpp b/src/xrc/xh_choic.cpp
index 2f91e382a8..f2dd0bdb43 100644
--- a/src/xrc/xh_choic.cpp
+++ b/src/xrc/xh_choic.cpp
@@ -77,7 +77,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/src/xrc/xh_combo.cpp b/src/xrc/xh_combo.cpp
index 3d708c3a49..2a17231c4f 100644
--- a/src/xrc/xh_combo.cpp
+++ b/src/xrc/xh_combo.cpp
@@ -83,7 +83,10 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/src/xrc/xh_listb.cpp b/src/xrc/xh_listb.cpp
index 50790fbb34..c3c9004d3f 100644
--- a/src/xrc/xh_listb.cpp
+++ b/src/xrc/xh_listb.cpp
@@ -83,7 +83,10 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}
diff --git a/src/xrc/xh_radbx.cpp b/src/xrc/xh_radbx.cpp
index 6ba0e86182..f2f229cd9c 100644
--- a/src/xrc/xh_radbx.cpp
+++ b/src/xrc/xh_radbx.cpp
@@ -84,7 +84,10 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
// handle - Label
// 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;
}