1
0
Fork 0
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:
Tom Poole 2021-06-30 13:00:21 +01:00
parent f1768843fb
commit fe4ba9071b
79 changed files with 3423 additions and 1332 deletions

View file

@ -498,14 +498,13 @@ private:
{
if (btn == &chooseFileButton && fileChooser.get() == nullptr)
{
SafePointer<AudioPlaybackDemo> safeThis (this);
if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage))
{
SafePointer<AudioPlaybackDemo> safeThis (this);
RuntimePermissions::request (RuntimePermissions::readExternalStorage,
[safeThis] (bool granted) mutable
{
if (granted)
if (safeThis != nullptr && granted)
safeThis->buttonClicked (&safeThis->chooseFileButton);
});
return;
@ -516,16 +515,16 @@ 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 && fc.getURLResults().size() > 0)
if (fc.getURLResults().size() > 0)
{
auto u = fc.getURLResult();
safeThis->showAudioResource (std::move (u));
showAudioResource (std::move (u));
}
safeThis->fileChooser = nullptr;
fileChooser = nullptr;
}, nullptr);
}
else