Add code for parsing globs file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -255,7 +255,18 @@ void wxMimeTypesManagerImpl::LoadXDGGlobs(const wxString& filename)
|
|||||||
if ( !file.Open() )
|
if ( !file.Open() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Parse it here
|
size_t i;
|
||||||
|
for (i = 0; i < file.GetLineCount(); i++)
|
||||||
|
{
|
||||||
|
wxStringTokenizer tok( file.GetLine(i), ":" );
|
||||||
|
wxString mime = tok.GetNextToken();
|
||||||
|
wxString ext = tok.GetNextToken();
|
||||||
|
ext.Remove( 0, 2 );
|
||||||
|
wxArrayString exts;
|
||||||
|
exts.Add( ext );
|
||||||
|
|
||||||
|
AddToMimeData(mime, wxEmptyString, NULL, exts, wxEmptyString, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user