Applied patch [ 866387 ] wxGenericDirCtrl does not accept multiple wildcards

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2004-01-08 14:44:23 +00:00
parent 93210c68cb
commit 3da4e4bd4a

View File

@ -834,16 +834,24 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
{
int style = wxDIR_FILES;
if (m_showHidden) style |= wxDIR_HIDDEN;
if (d.GetFirst(& eachFilename, m_currentFilterStr, style))
// Process each filter (ex: "JPEG Files (*.jpg;*.jpeg)|*.jpg;*.jpeg")
wxStringTokenizer strTok;
wxString curFilter;
strTok.SetString(m_currentFilterStr,wxT(";"));
while(strTok.HasMoreTokens())
{
do
curFilter = strTok.GetNextToken();
if (d.GetFirst(& eachFilename, m_currentFilterStr, style))
{
if ((eachFilename != wxT(".")) && (eachFilename != wxT("..")))
do
{
filenames.Add(eachFilename);
if ((eachFilename != wxT(".")) && (eachFilename != wxT("..")))
{
filenames.Add(eachFilename);
}
}
while (d.GetNext(& eachFilename));
}
while (d.GetNext(& eachFilename));
}
}
filenames.Sort(wxDirCtrlStringCompareFunction);