fix wxrc-generated c++ code to work in Unicode mode (patch #704064)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -408,15 +408,15 @@ _T("\n"));
|
|||||||
file.Write(FileToCppArray(flist[i], i));
|
file.Write(FileToCppArray(flist[i], i));
|
||||||
|
|
||||||
file.Write(_T("")
|
file.Write(_T("")
|
||||||
_T("void " + parFuncname + "()\n")
|
_T("void ") + parFuncname + wxT("()\n")
|
||||||
_T("{\n")
|
_T("{\n")
|
||||||
_T("\n")
|
_T("\n")
|
||||||
_T(" // Check for memory FS. If not present, load the handler:\n")
|
_T(" // Check for memory FS. If not present, load the handler:\n")
|
||||||
_T(" {\n")
|
_T(" {\n")
|
||||||
_T(" wxMemoryFSHandler::AddFile(\"XRC_resource/dummy_file\", \"dummy one\");\n")
|
_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/dummy_file\"), wxT(\"dummy one\"));\n")
|
||||||
_T(" wxFileSystem fsys;\n")
|
_T(" wxFileSystem fsys;\n")
|
||||||
_T(" wxFSFile *f = fsys.OpenFile(\"memory:XRC_resource/dummy_file\");\n")
|
_T(" wxFSFile *f = fsys.OpenFile(wxT(\"memory:XRC_resource/dummy_file\"));\n")
|
||||||
_T(" wxMemoryFSHandler::RemoveFile(\"XRC_resource/dummy_file\");\n")
|
_T(" wxMemoryFSHandler::RemoveFile(wxT(\"XRC_resource/dummy_file\"));\n")
|
||||||
_T(" if (f) delete f;\n")
|
_T(" if (f) delete f;\n")
|
||||||
_T(" else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n")
|
_T(" else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n")
|
||||||
_T(" }\n")
|
_T(" }\n")
|
||||||
@@ -425,15 +425,15 @@ _T("\n"));
|
|||||||
for (i = 0; i < flist.Count(); i++)
|
for (i = 0; i < flist.Count(); i++)
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
s.Printf(_T(" wxMemoryFSHandler::AddFile(\"XRC_resource/") + flist[i] +
|
s.Printf(_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/") + flist[i] +
|
||||||
_T("\", xml_res_file_%i, xml_res_size_%i);\n"), i, i);
|
_T("\"), xml_res_file_%i, xml_res_size_%i);\n"), i, i);
|
||||||
file.Write(s);
|
file.Write(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < parFiles.Count(); i++)
|
for (i = 0; i < parFiles.Count(); i++)
|
||||||
{
|
{
|
||||||
file.Write(_T(" wxXmlResource::Get()->Load(\"memory:XRC_resource/") +
|
file.Write(_T(" wxXmlResource::Get()->Load(wxT(\"memory:XRC_resource/") +
|
||||||
GetInternalFileName(parFiles[i], flist) + _T("\");\n"));
|
GetInternalFileName(parFiles[i], flist) + _T("\"));\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
file.Write(_T("}\n"));
|
file.Write(_T("}\n"));
|
||||||
|
@@ -408,15 +408,15 @@ _T("\n"));
|
|||||||
file.Write(FileToCppArray(flist[i], i));
|
file.Write(FileToCppArray(flist[i], i));
|
||||||
|
|
||||||
file.Write(_T("")
|
file.Write(_T("")
|
||||||
_T("void " + parFuncname + "()\n")
|
_T("void ") + parFuncname + wxT("()\n")
|
||||||
_T("{\n")
|
_T("{\n")
|
||||||
_T("\n")
|
_T("\n")
|
||||||
_T(" // Check for memory FS. If not present, load the handler:\n")
|
_T(" // Check for memory FS. If not present, load the handler:\n")
|
||||||
_T(" {\n")
|
_T(" {\n")
|
||||||
_T(" wxMemoryFSHandler::AddFile(\"XRC_resource/dummy_file\", \"dummy one\");\n")
|
_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/dummy_file\"), wxT(\"dummy one\"));\n")
|
||||||
_T(" wxFileSystem fsys;\n")
|
_T(" wxFileSystem fsys;\n")
|
||||||
_T(" wxFSFile *f = fsys.OpenFile(\"memory:XRC_resource/dummy_file\");\n")
|
_T(" wxFSFile *f = fsys.OpenFile(wxT(\"memory:XRC_resource/dummy_file\"));\n")
|
||||||
_T(" wxMemoryFSHandler::RemoveFile(\"XRC_resource/dummy_file\");\n")
|
_T(" wxMemoryFSHandler::RemoveFile(wxT(\"XRC_resource/dummy_file\"));\n")
|
||||||
_T(" if (f) delete f;\n")
|
_T(" if (f) delete f;\n")
|
||||||
_T(" else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n")
|
_T(" else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n")
|
||||||
_T(" }\n")
|
_T(" }\n")
|
||||||
@@ -425,15 +425,15 @@ _T("\n"));
|
|||||||
for (i = 0; i < flist.Count(); i++)
|
for (i = 0; i < flist.Count(); i++)
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
s.Printf(_T(" wxMemoryFSHandler::AddFile(\"XRC_resource/") + flist[i] +
|
s.Printf(_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/") + flist[i] +
|
||||||
_T("\", xml_res_file_%i, xml_res_size_%i);\n"), i, i);
|
_T("\"), xml_res_file_%i, xml_res_size_%i);\n"), i, i);
|
||||||
file.Write(s);
|
file.Write(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < parFiles.Count(); i++)
|
for (i = 0; i < parFiles.Count(); i++)
|
||||||
{
|
{
|
||||||
file.Write(_T(" wxXmlResource::Get()->Load(\"memory:XRC_resource/") +
|
file.Write(_T(" wxXmlResource::Get()->Load(wxT(\"memory:XRC_resource/") +
|
||||||
GetInternalFileName(parFiles[i], flist) + _T("\");\n"));
|
GetInternalFileName(parFiles[i], flist) + _T("\"));\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
file.Write(_T("}\n"));
|
file.Write(_T("}\n"));
|
||||||
|
Reference in New Issue
Block a user