Fix wildcard list when built on GTK

This commit is contained in:
jean-pierre charras 2019-01-01 17:04:40 +01:00
parent 14ede151cc
commit 4b7ef22ec4
1 changed files with 3 additions and 7 deletions

View File

@ -71,7 +71,7 @@ static wxString formatWildcardExt( const wxString& aWildcard )
wxString AddFileExtListToFilter( int aArgCnt, ... ) wxString AddFileExtListToFilter( int aArgCnt, ... )
{ {
wxString files_filter = " (*."; wxString files_filter = " (";
va_list args; va_list args;
va_start( args, aArgCnt ); va_start( args, aArgCnt );
@ -80,18 +80,14 @@ wxString AddFileExtListToFilter( int aArgCnt, ... )
for( int ii = 0; ii < aArgCnt; ii++) for( int ii = 0; ii < aArgCnt; ii++)
{ {
const char* ext = va_arg(args, char*); const char* ext = va_arg(args, char*);
files_filter << " *." << ext;
if( ii > 0 )
files_filter << " *.";
files_filter << formatWildcardExt( ext );
} }
files_filter << ")|*."; files_filter << ")|*.";
va_start( args, aArgCnt ); va_start( args, aArgCnt );
// Add extensions to the filter list: // Add extensions to the filter list, using a formated string (GTK specific):
for( int ii = 0; ii < aArgCnt; ii++) for( int ii = 0; ii < aArgCnt; ii++)
{ {
const char* ext = va_arg( args, const char* ); const char* ext = va_arg( args, const char* );