mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Set the default value of JUCE_MODAL_LOOPS_PERMITTED to 0
See BREAKING-CHANGES.txt for more details.
This commit is contained in:
parent
f1768843fb
commit
fe4ba9071b
79 changed files with 3423 additions and 1332 deletions
|
|
@ -590,14 +590,13 @@ private:
|
|||
if (fileChooser != nullptr)
|
||||
return;
|
||||
|
||||
SafePointer<AudioPlayerHeader> safeThis (this);
|
||||
|
||||
if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage))
|
||||
{
|
||||
SafePointer<AudioPlayerHeader> safeThis (this);
|
||||
RuntimePermissions::request (RuntimePermissions::readExternalStorage,
|
||||
[safeThis] (bool granted) mutable
|
||||
{
|
||||
if (granted)
|
||||
if (safeThis != nullptr && granted)
|
||||
safeThis->openFile();
|
||||
});
|
||||
return;
|
||||
|
|
@ -606,22 +605,19 @@ private:
|
|||
fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));
|
||||
|
||||
fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,
|
||||
[safeThis] (const FileChooser& fc) mutable
|
||||
[this] (const FileChooser& fc) mutable
|
||||
{
|
||||
if (safeThis == nullptr)
|
||||
return;
|
||||
|
||||
if (fc.getURLResults().size() > 0)
|
||||
{
|
||||
auto u = fc.getURLResult();
|
||||
|
||||
if (! safeThis->audioFileReader.loadURL (u))
|
||||
if (! audioFileReader.loadURL (u))
|
||||
NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr);
|
||||
else
|
||||
safeThis->thumbnailComp.setCurrentURL (u);
|
||||
thumbnailComp.setCurrentURL (u);
|
||||
}
|
||||
|
||||
safeThis->fileChooser = nullptr;
|
||||
fileChooser = nullptr;
|
||||
}, nullptr);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue