#endif
#include "wx/wx.h"
-#include "wx/xrc/xml.h"
+#include "wx/xml/xml.h"
#include "wx/xrc/xmlres.h"
#include "wx/splitter.h"
#include "wx/config.h"
m_Resource->SetRoot(new wxXmlNode(wxXML_ELEMENT_NODE, _("resource")));
m_Resource->SetFileEncoding("utf-8");
+#if !wxUSE_UNICODE
+ m_Resource->SetEncoding(wxLocale::GetSystemEncodingName());
+#endif
m_Resource->GetRoot()->AddProperty(_T("version"),
WX_XMLRES_CURRENT_VERSION_STRING);
static void RecursivelyExpand(wxTreeCtrl *t, wxTreeItemId item)
{
t->Expand(item);
- long cookie;
+ void* cookie;
wxTreeItemId id = t->GetFirstChild(item, cookie);
while (id.IsOk())
{
wxTreeItemId item;
XmlTreeData *dt;
wxXmlNode *nd;
- long cookie;
+ void* cookie;
item = m_TreeCtrl->GetFirstChild(*root, cookie);
while (item.IsOk())
if (node)
PropertiesFrame::Get()->ShowProps(node);
- if (m_TreeCtrl->GetParent(event.GetItem()) == m_TreeCtrl->GetRootItem())
+ if (m_TreeCtrl->GetItemParent(event.GetItem()) == m_TreeCtrl->GetRootItem())
{
wxTreeItemId it = event.GetOldItem();
if (it.IsOk() && m_TreeCtrl->GetRootItem() != it)
{
- while (m_TreeCtrl->GetParent(it) != m_TreeCtrl->GetRootItem())
- it = m_TreeCtrl->GetParent(it);
+ while (m_TreeCtrl->GetItemParent(it) != m_TreeCtrl->GetRootItem())
+ it = m_TreeCtrl->GetItemParent(it);
m_TreeCtrl->Collapse(it);
}
RecursivelyExpand(m_TreeCtrl, event.GetItem());
void EditorFrame::DeleteSelectedNode()
{
XmlTreeData *dt = (XmlTreeData*)
- (m_TreeCtrl->GetItemData(m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection())));
+ (m_TreeCtrl->GetItemData(m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
wxXmlNode *n = (dt) ? dt->Node : NULL;
m_SelectedNode->GetParent()->RemoveChild(m_SelectedNode);
{
XmlTreeData *pardt =
(XmlTreeData*)(m_TreeCtrl->GetItemData(
- m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection())));
+ m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
{
XmlTreeData *pardt =
(XmlTreeData*)(m_TreeCtrl->GetItemData(
- m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection())));
+ m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
{
wxXmlNode *nd = pardt->Node;
{
XmlTreeData *pardt =
(XmlTreeData*)(m_TreeCtrl->GetItemData(
- m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection())));
+ m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
{