Skip to content

Commit

Permalink
Merge pull request #529 from flukiluke/kdialog-fixes
Browse files Browse the repository at this point in the history
Fix calls to kdialog so filters work
  • Loading branch information
flukiluke authored Aug 17, 2024
2 parents ee247e6 + b569723 commit 810c80f
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions internal/c/parts/gui/tinyfiledialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ misrepresented as being the original software.
Thanks for contributions, bug corrections & thorough testing to:
- Don Heyse http://ldglite.sf.net for bug corrections & thorough testing!
- Paul Rouget
This software has been modified by the QB64PE project and has diverged from
the tinyfiledialogs distribution source.
*/


Expand Down Expand Up @@ -5436,16 +5439,19 @@ char * tinyfd_saveFileDialog(
if ( aNumOfFilterPatterns > 0 )
{
strcat(lDialogString , " '" ) ;
strcat( lDialogString , aFilterPatterns[0] ) ;
for ( i = 1 ; i < aNumOfFilterPatterns ; i ++ )
if ( aSingleFilterDescription && strlen(aSingleFilterDescription) )
{
strcat( lDialogString , " " ) ;
concatAndEscapeSingleQuote( lDialogString , aFilterPatterns[i] ) ;
concatAndEscapeSingleQuote( lDialogString , aSingleFilterDescription ) ;
strcat( lDialogString , " (" ) ;
}
for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ )
{
strcat( lDialogString , " " ) ;
concatAndEscapeSingleQuote( lDialogString , aFilterPatterns[i] ) ;
}
if ( aSingleFilterDescription && strlen(aSingleFilterDescription) )
{
strcat( lDialogString , " | " ) ;
concatAndEscapeSingleQuote( lDialogString , aSingleFilterDescription ) ;
strcat( lDialogString , ")" ) ;
}
strcat( lDialogString , "'" ) ;
}
Expand Down Expand Up @@ -5831,16 +5837,19 @@ char * tinyfd_openFileDialog(
if ( aNumOfFilterPatterns > 0 )
{
strcat(lDialogString , " '" ) ;
strcat( lDialogString , aFilterPatterns[0] ) ;
for ( i = 1 ; i < aNumOfFilterPatterns ; i ++ )
if ( aSingleFilterDescription && strlen(aSingleFilterDescription) )
{
strcat( lDialogString , " " ) ;
concatAndEscapeSingleQuote( lDialogString , aFilterPatterns[i] ) ;
concatAndEscapeSingleQuote( lDialogString , aSingleFilterDescription ) ;
strcat( lDialogString , " (" ) ;
}
for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ )
{
strcat( lDialogString , " " ) ;
concatAndEscapeSingleQuote( lDialogString , aFilterPatterns[i] ) ;
}
if ( aSingleFilterDescription && strlen(aSingleFilterDescription) )
{
strcat( lDialogString , " | " ) ;
concatAndEscapeSingleQuote( lDialogString , aSingleFilterDescription ) ;
strcat( lDialogString , ")" ) ;
}
strcat( lDialogString , "'" ) ;
}
Expand Down

0 comments on commit 810c80f

Please sign in to comment.