#include "wx/fontmap.h"
#include "wx/artprov.h"
-#include "wx/xrc/xml.h"
+#include "wx/xml/xml.h"
#include "wx/xrc/xmlres.h"
#include "wx/arrimpl.cpp"
fn.MakeAbsolute();
fnd = fn.GetFullPath();
}
+#if wxUSE_FILESYSTEM
+ fnd = wxFileSystem::FileNameToURL(fnd);
+#endif
}
#if wxUSE_FILESYSTEM
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
}
+IMPLEMENT_ABSTRACT_CLASS(wxXmlResourceHandler, wxObject)
void wxXmlResource::AddHandler(wxXmlResourceHandler *handler)
{
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
- ) isok = TRUE;
+#ifdef __MAC__
+ if (s == wxT("mac")) isok = true;
+#endif
+#ifdef __OS2__
+ if (s == wxT("os2")) isok = true;
+#endif
+
+ if (isok)
+ break;
}
}
#if !wxUSE_UNICODE && wxUSE_INTL
if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 )
{
- // In case we are not using wxLocale to translate strings, convert the strings
- // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because
- // it could break wxGetTranslation lookup.
+ // In case we are not using wxLocale to translate strings, convert the
+ // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE
+ // is on, because it could break wxGetTranslation lookup.
encoding = wxLocale::GetSystemEncodingName();
}
#endif
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()));
static void CleanXRCID_Records()
{
for (int i = 0; i < XRCID_TABLE_SIZE; i++)
+ {
CleanXRCID_Record(XRCID_Records[i]);
+ XRCID_Records[i] = NULL;
+ }
}
static void AddStdXRCID_Records()
module->Init();
wxModule::RegisterModule(module);
}
-
-