Better #if checks for mac in ProcessPlatformProperty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -107,7 +107,7 @@ bool wxXmlResource::Load(const wxString& filemask)
|
|||||||
// filename and not URL:
|
// filename and not URL:
|
||||||
if (wxFileName::FileExists(fnd))
|
if (wxFileName::FileExists(fnd))
|
||||||
{
|
{
|
||||||
// Make the name absolute filename, because the app may
|
// Make the name absolute filename, because the app may
|
||||||
// change working directory later:
|
// change working directory later:
|
||||||
wxFileName fn(fnd);
|
wxFileName fn(fnd);
|
||||||
if (fn.IsRelative())
|
if (fn.IsRelative())
|
||||||
@@ -119,7 +119,7 @@ bool wxXmlResource::Load(const wxString& filemask)
|
|||||||
fnd = wxFileSystem::FileNameToURL(fnd);
|
fnd = wxFileSystem::FileNameToURL(fnd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_FILESYSTEM
|
#if wxUSE_FILESYSTEM
|
||||||
if (fnd.Lower().Matches(wxT("*.zip")) ||
|
if (fnd.Lower().Matches(wxT("*.zip")) ||
|
||||||
fnd.Lower().Matches(wxT("*.xrs")))
|
fnd.Lower().Matches(wxT("*.xrs")))
|
||||||
@@ -290,11 +290,10 @@ static void ProcessPlatformProperty(wxXmlNode *node)
|
|||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
if (s == wxT("win")) isok = true;
|
if (s == wxT("win")) isok = true;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __UNIX__
|
#if defined(__MAC__) || defined(__APPLE__)
|
||||||
if (s == wxT("unix")) isok = true;
|
|
||||||
#endif
|
|
||||||
#ifdef __MAC__
|
|
||||||
if (s == wxT("mac")) isok = true;
|
if (s == wxT("mac")) isok = true;
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
if (s == wxT("unix")) isok = true;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __OS2__
|
#ifdef __OS2__
|
||||||
if (s == wxT("os2")) isok = true;
|
if (s == wxT("os2")) isok = true;
|
||||||
@@ -569,14 +568,14 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
|
|||||||
wxXmlResourceHandler *handler;
|
wxXmlResourceHandler *handler;
|
||||||
|
|
||||||
if (handlerToUse)
|
if (handlerToUse)
|
||||||
{
|
{
|
||||||
if (handlerToUse->CanHandle(node))
|
if (handlerToUse->CanHandle(node))
|
||||||
{
|
{
|
||||||
return handlerToUse->CreateResource(node, parent, instance);
|
return handlerToUse->CreateResource(node, parent, instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node->GetName() == wxT("object"))
|
else if (node->GetName() == wxT("object"))
|
||||||
{
|
{
|
||||||
wxNode *ND = m_handlers.GetFirst();
|
wxNode *ND = m_handlers.GetFirst();
|
||||||
while (ND)
|
while (ND)
|
||||||
{
|
{
|
||||||
|
@@ -107,7 +107,7 @@ bool wxXmlResource::Load(const wxString& filemask)
|
|||||||
// filename and not URL:
|
// filename and not URL:
|
||||||
if (wxFileName::FileExists(fnd))
|
if (wxFileName::FileExists(fnd))
|
||||||
{
|
{
|
||||||
// Make the name absolute filename, because the app may
|
// Make the name absolute filename, because the app may
|
||||||
// change working directory later:
|
// change working directory later:
|
||||||
wxFileName fn(fnd);
|
wxFileName fn(fnd);
|
||||||
if (fn.IsRelative())
|
if (fn.IsRelative())
|
||||||
@@ -119,7 +119,7 @@ bool wxXmlResource::Load(const wxString& filemask)
|
|||||||
fnd = wxFileSystem::FileNameToURL(fnd);
|
fnd = wxFileSystem::FileNameToURL(fnd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_FILESYSTEM
|
#if wxUSE_FILESYSTEM
|
||||||
if (fnd.Lower().Matches(wxT("*.zip")) ||
|
if (fnd.Lower().Matches(wxT("*.zip")) ||
|
||||||
fnd.Lower().Matches(wxT("*.xrs")))
|
fnd.Lower().Matches(wxT("*.xrs")))
|
||||||
@@ -290,11 +290,10 @@ static void ProcessPlatformProperty(wxXmlNode *node)
|
|||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
if (s == wxT("win")) isok = true;
|
if (s == wxT("win")) isok = true;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __UNIX__
|
#if defined(__MAC__) || defined(__APPLE__)
|
||||||
if (s == wxT("unix")) isok = true;
|
|
||||||
#endif
|
|
||||||
#ifdef __MAC__
|
|
||||||
if (s == wxT("mac")) isok = true;
|
if (s == wxT("mac")) isok = true;
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
if (s == wxT("unix")) isok = true;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __OS2__
|
#ifdef __OS2__
|
||||||
if (s == wxT("os2")) isok = true;
|
if (s == wxT("os2")) isok = true;
|
||||||
@@ -569,14 +568,14 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
|
|||||||
wxXmlResourceHandler *handler;
|
wxXmlResourceHandler *handler;
|
||||||
|
|
||||||
if (handlerToUse)
|
if (handlerToUse)
|
||||||
{
|
{
|
||||||
if (handlerToUse->CanHandle(node))
|
if (handlerToUse->CanHandle(node))
|
||||||
{
|
{
|
||||||
return handlerToUse->CreateResource(node, parent, instance);
|
return handlerToUse->CreateResource(node, parent, instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node->GetName() == wxT("object"))
|
else if (node->GetName() == wxT("object"))
|
||||||
{
|
{
|
||||||
wxNode *ND = m_handlers.GetFirst();
|
wxNode *ND = m_handlers.GetFirst();
|
||||||
while (ND)
|
while (ND)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user