X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13de23f6d86a5fcd61e340f3d0b47d9211510964..e5db28fd7cda3943b41e86a731c65358284bb0ce:/contrib/src/xrc/xmlres.cpp diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index dc9a434c95..f7355536ee 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -121,7 +121,8 @@ bool wxXmlResource::Load(const wxString& filemask) if (fnd.Lower().Matches(wxT("*.zip")) || fnd.Lower().Matches(wxT("*.xrs"))) { - rt = rt && Load(fnd + wxT("#zip:*.xrc")); + wxString url(wxFileSystem::FileNameToURL(fnd)); + rt = rt && Load(url + wxT("#zip:*.xrc")); } else #endif @@ -282,19 +283,21 @@ static void ProcessPlatformProperty(wxXmlNode *node) while (tkn.HasMoreTokens()) { s = tkn.GetNextToken(); - if ( #ifdef __WXMSW__ - s == wxString(wxT("win")) -#elif defined(__UNIX__) - s == wxString(wxT("unix")) -#elif defined(__MAC__) - s == wxString(wxT("mac")) -#elif defined(__OS2__) - s == wxString(wxT("os2")) -#else - FALSE + if (s == wxT("win")) isok = true; +#endif +#ifdef __UNIX__ + if (s == wxT("unix")) isok = true; +#endif +#ifdef __MAC__ + if (s == wxT("mac")) isok = true; +#endif +#ifdef __OS2__ + if (s == wxT("os2")) isok = true; #endif - ) isok = TRUE; + + if (isok) + break; } } @@ -865,7 +868,8 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param, wxFSFile *fsfile = GetCurFileSystem().OpenFile(name); if (fsfile == NULL) { - wxLogError(_("XRC resource: Cannot create bitmap from '%s'."), param.c_str()); + wxLogError(_("XRC resource: Cannot create bitmap from '%s'."), + name.c_str()); return wxNullBitmap; } wxImage img(*(fsfile->GetStream()));