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
|
|
@ -213,11 +213,10 @@ public:
|
|||
{
|
||||
if (error.isNotEmpty())
|
||||
{
|
||||
NativeMessageBox::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
"Plugin Load Failed",
|
||||
error,
|
||||
nullptr,
|
||||
nullptr);
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
|
||||
"Plugin Load Failed",
|
||||
error);
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -281,6 +280,7 @@ private:
|
|||
std::unique_ptr<AudioPluginInstance> inner;
|
||||
EditorStyle editorStyle = EditorStyle{};
|
||||
bool active = false;
|
||||
ScopedMessageBox messageBox;
|
||||
|
||||
static constexpr const char* innerStateTag = "inner_state";
|
||||
static constexpr const char* editorStyleTag = "editor_style";
|
||||
|
|
@ -298,7 +298,6 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
constexpr const char* HostAudioProcessorImpl::innerStateTag;
|
||||
constexpr const char* HostAudioProcessorImpl::editorStyleTag;
|
||||
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
bool isLegacyModeValid() const
|
||||
bool isLegacyModeValid()
|
||||
{
|
||||
if (! areLegacyModeParametersValid())
|
||||
{
|
||||
|
|
@ -1233,13 +1233,14 @@ private:
|
|||
return getFirstChannel() <= getLastChannel();
|
||||
}
|
||||
|
||||
void handleInvalidLegacyModeParameters() const
|
||||
void handleInvalidLegacyModeParameters()
|
||||
{
|
||||
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
|
||||
"Invalid legacy mode channel layout",
|
||||
"Cannot set legacy mode start/end channel:\n"
|
||||
"The end channel must not be less than the start channel!",
|
||||
"Got it");
|
||||
auto options = MessageBoxOptions::makeOptionsOk (AlertWindow::WarningIcon,
|
||||
"Invalid legacy mode channel layout",
|
||||
"Cannot set legacy mode start/end channel:\n"
|
||||
"The end channel must not be less than the start channel!",
|
||||
"Got it");
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
}
|
||||
|
||||
MPESettingsDataModel dataModel;
|
||||
|
|
@ -1251,6 +1252,7 @@ private:
|
|||
legacyPitchbendRangeLabel { {}, "Pitchbend range (semitones)" };
|
||||
|
||||
UndoManager* undoManager;
|
||||
ScopedMessageBox messageBox;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue