X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b813b73cd79cfb4d275e9628811f379e8c5ee39..bdc8dd3c890c05da2b9998f758c06dece118f91f:/include/wx/mimetype.h diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 0f5b78819b..773d4a7672 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -23,6 +23,8 @@ #include "wx/defs.h" +#if wxUSE_MIMETYPE + // the things we really need #include "wx/string.h" #include "wx/dynarray.h" @@ -174,7 +176,8 @@ public: public: // ctors MessageParameters() { } - MessageParameters(const wxString& filename, const wxString& mimetype) + MessageParameters(const wxString& filename, + const wxString& mimetype = _T("")) : m_filename(filename), m_mimetype(mimetype) { } // accessors (called by GetOpenCommand) @@ -219,6 +222,9 @@ public: // get the command to execute the file of given type bool GetOpenCommand(wxString *openCmd, const MessageParameters& params) const; + // a simpler to use version of GetOpenCommand() -- it only takes the + // filename and returns an empty string on failure + wxString GetOpenCommand(const wxString& filename) const; // get the command to print the file of given type bool GetPrintCommand(wxString *printCmd, const MessageParameters& params) const; @@ -385,5 +391,7 @@ private: // the default mime manager for wxWindows programs WXDLLEXPORT_DATA(extern wxMimeTypesManager *) wxTheMimeTypesManager; +#endif // wxUSE_MIMETYPE + #endif //_WX_MIMETYPE_H_