X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f627fbee501c6dfad8a160d163a2987b1ac8ae42..3d3a4a25addf9729c74a8d0f7a056b57bb7f7e2a:/src/common/mimecmn.cpp diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index bd85dc0a58..1510e92b2f 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -31,16 +31,11 @@ #if wxUSE_MIMETYPE -#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" #endif //WX_PRECOMP +#include "wx/module.h" #include "wx/log.h" #include "wx/file.h" #include "wx/iconloc.h" @@ -285,6 +280,25 @@ bool wxFileType::GetIcon(wxIconLocation *iconLoc) const return m_impl->GetIcon(iconLoc); } +bool +wxFileType::GetIcon(wxIconLocation *iconloc, + const MessageParameters& params) const +{ + if ( !GetIcon(iconloc) ) + { + return false; + } + + // we may have "%s" in the icon location string, at least under Windows, so + // expand this + if ( iconloc ) + { + iconloc->SetFileName(ExpandCommand(iconloc->GetFileName(), params)); + } + + return true; +} + bool wxFileType::GetDescription(wxString *desc) const { wxCHECK_MSG( desc, FALSE, _T("invalid parameter in GetDescription") );