mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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
|
|
@ -462,9 +462,10 @@ void MainWindow::openPIP (const File& pipFile, std::function<void (bool)> callba
|
|||
|
||||
if (generatorResult != Result::ok())
|
||||
{
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
generatorResult.getErrorMessage());
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
generatorResult.getErrorMessage());
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
|
||||
if (callback != nullptr)
|
||||
callback (false);
|
||||
|
|
@ -474,9 +475,10 @@ void MainWindow::openPIP (const File& pipFile, std::function<void (bool)> callba
|
|||
|
||||
if (! generator->createMainCpp())
|
||||
{
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
"Failed to create Main.cpp.");
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
"Failed to create Main.cpp.");
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
|
||||
if (callback != nullptr)
|
||||
callback (false);
|
||||
|
|
@ -491,9 +493,10 @@ void MainWindow::openPIP (const File& pipFile, std::function<void (bool)> callba
|
|||
|
||||
if (! openedSuccessfully)
|
||||
{
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
"Failed to open .jucer file.");
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
|
||||
"PIP Error.",
|
||||
"Failed to open .jucer file.");
|
||||
parent->messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
|
||||
if (callback != nullptr)
|
||||
callback (false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue