X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fc93ebd18480a085e6f0f3436a1af62848257bf..9f4ed8613c2853dbf8b190b41dbdafa960b33a85:/src/generic/dirctrlg.cpp?ds=inline diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 622be49ebe..a8897cdf8c 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -818,7 +818,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) dirs.Add(eachFilename); } } - while (d.GetNext(& eachFilename)); + while (d.GetNext(&eachFilename)); } } dirs.Sort(wxDirCtrlStringCompareFunction); @@ -832,16 +832,26 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) if (d.IsOpened()) { - if (d.GetFirst(& eachFilename, m_currentFilterStr, wxDIR_FILES)) + int style = wxDIR_FILES; + if (m_showHidden) style |= wxDIR_HIDDEN; + // 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);