fixes to newly added i18n code in XRC - don't use it if wxXRC_USE_LOCALE isn't used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bbcd408aa7
commit
74c107ba48
@ -215,6 +215,9 @@ public:
|
|||||||
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
|
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
|
||||||
static wxXmlResource *Set(wxXmlResource *res);
|
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:
|
protected:
|
||||||
// Scans the resources list for unloaded files and loads them. Also reloads
|
// Scans the resources list for unloaded files and loads them. Also reloads
|
||||||
// files that have been modified since last loading.
|
// files that have been modified since last loading.
|
||||||
@ -229,9 +232,6 @@ protected:
|
|||||||
// Creates a resource from information in the given node.
|
// Creates a resource from information in the given node.
|
||||||
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
|
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:
|
private:
|
||||||
long m_version;
|
long m_version;
|
||||||
|
|
||||||
|
@ -91,7 +91,10 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
|
|||||||
// handle <item checked="boolean">Label</item>
|
// handle <item checked="boolean">Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,10 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,10 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,10 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item selected="boolean">Label</item>
|
// handle <item selected="boolean">Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -215,6 +215,9 @@ public:
|
|||||||
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
|
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
|
||||||
static wxXmlResource *Set(wxXmlResource *res);
|
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:
|
protected:
|
||||||
// Scans the resources list for unloaded files and loads them. Also reloads
|
// Scans the resources list for unloaded files and loads them. Also reloads
|
||||||
// files that have been modified since last loading.
|
// files that have been modified since last loading.
|
||||||
@ -229,9 +232,6 @@ protected:
|
|||||||
// Creates a resource from information in the given node.
|
// Creates a resource from information in the given node.
|
||||||
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
|
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:
|
private:
|
||||||
long m_version;
|
long m_version;
|
||||||
|
|
||||||
|
@ -91,7 +91,10 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
|
|||||||
// handle <item checked="boolean">Label</item>
|
// handle <item checked="boolean">Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,10 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,10 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item>Label</item>
|
// handle <item>Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,10 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
|
|||||||
// handle <item selected="boolean">Label</item>
|
// handle <item selected="boolean">Label</item>
|
||||||
|
|
||||||
// add to the list
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user