X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..844f90fba68fc9fbd3e839825d406839ee9fb9fb:/src/unix/mimetype.cpp diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 1b8cf25097..573747fe13 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -322,6 +322,9 @@ ArrayIconHandlers wxMimeTypesManagerImpl::ms_iconHandlers; // with blank lines separating the entries and indented lines starting with // TABs. We're interested in the field icon-filename whose value is the path // containing the icon. +// +// Update (Chris Elliott): apparently there may be an optional "[lang]" prefix +// just before the field name. void wxGNOMEIconHandler::LoadIconsFromKeyFile(const wxString& filename) { @@ -389,6 +392,16 @@ void wxGNOMEIconHandler::LoadIconsFromKeyFile(const wxString& filename) // this is a field=value ling pc++; // skip leading TAB + // skip optional "[lang]" + if ( *pc == _T('[') ) + { + while ( *pc ) + { + if ( *pc++ == _T(']') ) + break; + } + } + static const int lenField = 13; // strlen("icon-filename") if ( wxStrncmp(pc, _T("icon-filename"), lenField) == 0 ) {