Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calls to kdialog so filters work #529

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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