allow multiple extensions in tge generic wxFileDialog (patch 457580)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -399,9 +399,9 @@ void MyFrame::MultiChoice(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
// wxFAIL_MSG( "Test assert" );
|
||||
|
||||
wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0);
|
||||
wxFileDialog dialog(this, "Testing open file dialog",
|
||||
"", "",
|
||||
"C++ files (*.h;*.cpp)|*.h;*.cpp");
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@@ -655,7 +655,12 @@ void wxFileCtrl::Update()
|
||||
f = wxFindNextFile();
|
||||
}
|
||||
|
||||
res = m_dirName + wxT("/") + m_wild;
|
||||
// Tokenize the wildcard string, so we can handle more than 1
|
||||
// search pattern in a wildcard.
|
||||
wxStringTokenizer tokenWild( m_wild, ";" );
|
||||
while ( tokenWild.HasMoreTokens() )
|
||||
{
|
||||
res = m_dirName + wxT("/") + tokenWild.GetNextToken();
|
||||
f = wxFindFirstFile( res.GetData(), wxFILE );
|
||||
while (!f.IsEmpty())
|
||||
{
|
||||
@@ -669,6 +674,7 @@ void wxFileCtrl::Update()
|
||||
}
|
||||
f = wxFindNextFile();
|
||||
}
|
||||
}
|
||||
|
||||
SortItems( ListCompare, 0 );
|
||||
|
||||
|
Reference in New Issue
Block a user