#ifndef WX_PRECOMP
#include "wx/module.h"
#endif
+// this one is needed for MSVC5
+#include "wx/module.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
// wxFileTypeInfo
// ----------------------------------------------------------------------------
-wxFileTypeInfo::wxFileTypeInfo(const char *mimeType,
- const char *openCmd,
- const char *printCmd,
- const char *desc,
+wxFileTypeInfo::wxFileTypeInfo(const wxChar *mimeType,
+ const wxChar *openCmd,
+ const wxChar *printCmd,
+ const wxChar *desc,
...)
: m_mimeType(mimeType),
m_openCmd(openCmd),
for ( ;; )
{
- const char *ext = va_arg(argptr, const char *);
+ const wxChar *ext = va_arg(argptr, const wxChar *);
if ( !ext )
{
// NULL terminates the list
return m_impl->GetOpenCommand(openCmd, params);
}
+wxString wxFileType::GetOpenCommand(const wxString& filename) const
+{
+ wxString cmd;
+ if ( !GetOpenCommand(&cmd, filename) )
+ {
+ // return empty string to indicate an error
+ cmd.clear();
+ }
+
+ return cmd;
+}
+
bool
wxFileType::GetPrintCommand(wxString *printCmd,
const wxFileType::MessageParameters& params) const
// VZ: should we do this?
// chris elliott : only makes sense in MS windows
if ( sTmp.empty() )
- GetOpenCommand(&sTmp, wxFileType::MessageParameters("", ""));
+ GetOpenCommand(&sTmp, wxFileType::MessageParameters(wxT(""), wxT("")));
#endif
wxCHECK_MSG( !sTmp.empty(), FALSE, _T("need the icon file") );
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
{
-#if defined(__UNIX__) && !defined(__WXPM__)
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WINE__)
return m_impl->Unassociate(ft);
#else
return ft->Unassociate();
void wxMimeTypesManager::Initialize(int mcapStyle,
const wxString& sExtraDir)
{
-#if defined(__UNIX__) && !defined(__WXPM__)
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WINE__)
EnsureImpl();
m_impl->Initialize(mcapStyle, sExtraDir);
// and this function clears all the data from the manager
void wxMimeTypesManager::ClearData()
{
-#if defined(__UNIX__) && !defined(__WXPM__)
+#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WINE__)
EnsureImpl();
m_impl->ClearData();
{
delete gs_mimeTypesManager.m_impl;
gs_mimeTypesManager.m_impl = NULL;
+ gs_mimeTypesManager.m_fallbacks.Clear();
}
}