From 2190e64f92582628ff9ab7924852a3d36f75aad1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Oct 2003 19:25:01 +0000 Subject: [PATCH] don't show warnings about x-foo keywords in mimetype file git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/mimetype.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 0627dab217..77ab82d6e8 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -2161,14 +2161,19 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) else if ( strLHS == wxT("exts") ) { strExtensions = strRHS; } - else { + else if ( strLHS == _T("icon") ) + { // this one is simply ignored: it usually refers to Netscape // built in icons which are useless for us anyhow - if ( strLHS != _T("icon") ) - { - wxLogWarning(_("Unknown field in file %s, line %d: '%s'."), - strFileName.c_str(), nLine + 1, strLHS.c_str()); - } + } + else if ( !strLHS.StartsWith(_T("x-")) ) + { + // we suppose that all fields starting with "X-" are + // unregistered extensions according to the standard practice, + // but it may be worth telling the user about other junk in + // his mime.types file + wxLogWarning(_("Unknown field in file %s, line %d: '%s'."), + strFileName.c_str(), nLine + 1, strLHS.c_str()); } if ( !entryEnded ) {