mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Added linux support for wildcards when using kdialog.
This commit is contained in:
parent
41669fd458
commit
8f4efb126b
1 changed files with 8 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ bool FileChooser::isPlatformDialogAvailable()
|
|||
void FileChooser::showPlatformDialog (Array<File>& results,
|
||||
const String& title,
|
||||
const File& file,
|
||||
const String& /* filters */,
|
||||
const String& filters,
|
||||
bool isDirectory,
|
||||
bool /* selectsFiles */,
|
||||
bool isSave,
|
||||
|
|
@ -80,10 +80,14 @@ void FileChooser::showPlatformDialog (Array<File>& results,
|
|||
|
||||
String startPath;
|
||||
|
||||
if (file.exists() || file.getParentDirectory().exists())
|
||||
if (file.exists())
|
||||
{
|
||||
startPath = file.getFullPathName();
|
||||
}
|
||||
else if (file.getParentDirectory().exists())
|
||||
{
|
||||
startPath = file.getParentDirectory().getFullPathName();
|
||||
}
|
||||
else
|
||||
{
|
||||
startPath = File::getSpecialLocation (File::userHomeDirectory).getFullPathName();
|
||||
|
|
@ -93,6 +97,8 @@ void FileChooser::showPlatformDialog (Array<File>& results,
|
|||
}
|
||||
|
||||
args.add (startPath);
|
||||
args.add (filters.replaceCharacter (';', ' '));
|
||||
args.add ("2>/dev/null");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue