projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made GetColourFromGTKWidget() more general, it is now used for all colours
[wxWidgets.git]
/
src
/
common
/
mimecmn.cpp
diff --git
a/src/common/mimecmn.cpp
b/src/common/mimecmn.cpp
index a4785b974db5f31a1e6de9c6015ce5617472a84d..8a16ced893591f3c2bd0bfedbf94587588b1b72f 100644
(file)
--- 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"
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/module.h"
#ifdef __BORLANDC__
#ifdef __BORLANDC__
- #pragma hdrstop
+
#pragma hdrstop
#endif
#endif
+#if wxUSE_MIMETYPE
+
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
-
#include "wx/defs
.h"
+
#include "wx/module
.h"
#endif
#endif
+// this one is needed for MSVC5
+#include "wx/module.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
@@
-385,10
+388,9
@@
bool wxFileType::Unassociate()
{
#if defined(__WXMSW__)
return m_impl->Unassociate();
{
#if defined(__WXMSW__)
return m_impl->Unassociate();
-#elif defined(__UNIX__)
+#elif defined(__UNIX__)
&& !defined(__WXPM__)
return m_impl->Unassociate(this);
#else
return m_impl->Unassociate(this);
#else
-
wxFAIL_MSG( _T("not implemented") ); // TODO
return FALSE;
#endif
wxFAIL_MSG( _T("not implemented") ); // TODO
return FALSE;
#endif
@@
-401,7
+403,6
@@
bool overwriteprompt)
return m_impl->SetCommand(cmd, verb, overwriteprompt);
#else
wxFAIL_MSG(_T("not implemented"));
return m_impl->SetCommand(cmd, verb, overwriteprompt);
#else
wxFAIL_MSG(_T("not implemented"));
-
return FALSE;
#endif
}
return FALSE;
#endif
}
@@
-473,7
+474,7
@@
wxMimeTypesManager::~wxMimeTypesManager()
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
{
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
{
-#if defined(__UNIX__)
+#if defined(__UNIX__)
&& !defined(__WXPM__)
return m_impl->Unassociate(ft);
#else
return ft->Unassociate();
return m_impl->Unassociate(ft);
#else
return ft->Unassociate();
@@
-486,7
+487,7
@@
wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo)
{
EnsureImpl();
{
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
return m_impl->Associate(ftInfo);
#else // other platforms
wxFAIL_MSG( _T("not implemented") ); // TODO
@@
-583,17
+584,20
@@
size_t wxMimeTypesManager::EnumAllFileTypes(wxArrayString& mimetypes)
void wxMimeTypesManager::Initialize(int mcapStyle,
const wxString& sExtraDir)
{
void wxMimeTypesManager::Initialize(int mcapStyle,
const wxString& sExtraDir)
{
-#if
def __UNIX__
+#if
defined(__UNIX__) && !defined(__WXPM__)
EnsureImpl();
m_impl->Initialize(mcapStyle, sExtraDir);
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()
{
#endif // Unix
}
// and this function clears all the data from the manager
void wxMimeTypesManager::ClearData()
{
-#if
def __UNIX__
+#if
defined(__UNIX__) && !defined(__WXPM__)
EnsureImpl();
m_impl->ClearData();
EnsureImpl();
m_impl->ClearData();
@@
-629,3
+633,5
@@
public:
};
IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule)
};
IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule)
+
+#endif // wxUSE_MIMETYPE