|
|
|
@@ -148,6 +148,16 @@ private: |
|
|
|
SilentDummyModalComp dummyModalComponent;
|
|
|
|
};
|
|
|
|
|
|
|
|
static NSMutableArray* createAllowedTypesArray (const StringArray& filters)
|
|
|
|
{
|
|
|
|
NSMutableArray* filterArray = [[[NSMutableArray alloc] init] autorelease];
|
|
|
|
|
|
|
|
for (int i = 0; i < filters.size(); ++i)
|
|
|
|
[filterArray addObject: juceStringToNS (filters[i].replace ("*.", ""))];
|
|
|
|
|
|
|
|
return filterArray;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
void FileChooser::showPlatformDialog (Array<File>& results,
|
|
|
|
const String& title,
|
|
|
|
@@ -186,6 +196,9 @@ void FileChooser::showPlatformDialog (Array<File>& results, |
|
|
|
|
|
|
|
[panel setTitle: juceStringToNS (title)];
|
|
|
|
|
|
|
|
if (filters->size() != 0)
|
|
|
|
[panel setAllowedFileTypes: createAllowedTypesArray (*filters)];
|
|
|
|
|
|
|
|
if (! isSaveDialogue)
|
|
|
|
{
|
|
|
|
NSOpenPanel* openPanel = (NSOpenPanel*) panel;
|
|
|
|
|