1
0
Fork 0
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:
jules 2014-01-22 16:26:15 +00:00
parent 41669fd458
commit 8f4efb126b

View file

@ -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
{