// 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"
{
#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
return FALSE;
#endif
return m_impl->SetCommand(cmd, verb, overwriteprompt);
#else
wxFAIL_MSG(_T("not implemented"));
-
return FALSE;
#endif
}
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
{
-#if defined(__UNIX__)
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
return m_impl->Unassociate(ft);
#else
return ft->Unassociate();
{
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
void wxMimeTypesManager::Initialize(int mcapStyle,
const wxString& sExtraDir)
{
-#ifdef __UNIX__
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
EnsureImpl();
m_impl->Initialize(mcapStyle, sExtraDir);
+#else
+ (void)mcapStyle;
+ (void)sExtraDir;
#endif // Unix
}
// and this function clears all the data from the manager
void wxMimeTypesManager::ClearData()
{
-#ifdef __UNIX__
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
EnsureImpl();
m_impl->ClearData();
{
delete gs_mimeTypesManager.m_impl;
gs_mimeTypesManager.m_impl = NULL;
+ gs_mimeTypesManager.m_fallbacks.Clear();
}
}
};
IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule)
+
+#endif // wxUSE_MIMETYPE