X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..d9ff0f91fbddae88286567cab74dcfb59c91fc0f:/src/common/mimecmn.cpp diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index 3ddea52b66..8a16ced893 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -24,15 +24,18 @@ // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/module.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif +#if wxUSE_MIMETYPE + #ifndef WX_PRECOMP - #include "wx/defs.h" + #include "wx/module.h" #endif +// this one is needed for MSVC5 +#include "wx/module.h" #ifndef WX_PRECOMP #include "wx/string.h" @@ -385,7 +388,7 @@ bool wxFileType::Unassociate() { #if defined(__WXMSW__) return m_impl->Unassociate(); -#elif defined(__UNIX__) +#elif defined(__UNIX__) && !defined(__WXPM__) return m_impl->Unassociate(this); #else wxFAIL_MSG( _T("not implemented") ); // TODO @@ -471,7 +474,7 @@ wxMimeTypesManager::~wxMimeTypesManager() bool wxMimeTypesManager::Unassociate(wxFileType *ft) { -#if defined(__UNIX__) +#if defined(__UNIX__) && !defined(__WXPM__) return m_impl->Unassociate(ft); #else return ft->Unassociate(); @@ -484,7 +487,7 @@ wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo) { EnsureImpl(); -#if defined(__WXMSW__) || defined(__UNIX__) +#if defined(__WXMSW__) || (defined(__UNIX__) && !defined(__WXPM__)) return m_impl->Associate(ftInfo); #else // other platforms wxFAIL_MSG( _T("not implemented") ); // TODO @@ -581,7 +584,7 @@ size_t wxMimeTypesManager::EnumAllFileTypes(wxArrayString& mimetypes) void wxMimeTypesManager::Initialize(int mcapStyle, const wxString& sExtraDir) { -#ifdef __UNIX__ +#if defined(__UNIX__) && !defined(__WXPM__) EnsureImpl(); m_impl->Initialize(mcapStyle, sExtraDir); @@ -594,7 +597,7 @@ void wxMimeTypesManager::Initialize(int mcapStyle, // and this function clears all the data from the manager void wxMimeTypesManager::ClearData() { -#ifdef __UNIX__ +#if defined(__UNIX__) && !defined(__WXPM__) EnsureImpl(); m_impl->ClearData(); @@ -630,3 +633,5 @@ public: }; IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule) + +#endif // wxUSE_MIMETYPE