mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
ScopedMessageBox: Replace old AlertWindow uses with new API
This commit is contained in:
parent
79ed81c24a
commit
39a731de46
55 changed files with 893 additions and 677 deletions
|
|
@ -596,13 +596,17 @@ private:
|
|||
const auto u = fc.getURLResult();
|
||||
|
||||
if (! audioFileReader.loadURL (u))
|
||||
NativeMessageBox::showAsync (MessageBoxOptions()
|
||||
.withIconType (MessageBoxIconType::WarningIcon)
|
||||
.withTitle ("Error loading file")
|
||||
.withMessage ("Unable to load audio file"),
|
||||
nullptr);
|
||||
{
|
||||
auto options = MessageBoxOptions().withIconType (MessageBoxIconType::WarningIcon)
|
||||
.withTitle ("Error loading file")
|
||||
.withMessage ("Unable to load audio file")
|
||||
.withButton ("OK");
|
||||
messageBox = NativeMessageBox::showScopedAsync (options, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
thumbnailComp.setCurrentURL (u);
|
||||
}
|
||||
}
|
||||
|
||||
fileChooser = nullptr;
|
||||
|
|
@ -629,6 +633,7 @@ private:
|
|||
|
||||
AudioFileReaderComponent& audioFileReader;
|
||||
std::unique_ptr<FileChooser> fileChooser;
|
||||
ScopedMessageBox messageBox;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue