When the AvailableModulesList is destroyed, it will wait for the current
module scanning job (running on a background thread) to complete. This
job will try to take the AvailableModulesList::lock when it completes,
so the lock must outlive the background thread.
Previously, when saving a temporary project, two native dialogs would be
created. The first was very short-lived, as it was automatically
dismissed by the second dialog. On older macOS versions, this appeared
to work correctly (the first dialog was so short-lived that it did not
appear to the user). However, on macOS 12.0, the second dialog fails to
display altogether.
Displaying two file chooser dialogs feels like a programming error, so
the code has been reorganised a bit to avoid this case.
When the result of find_if() is only compared to the container's end(),
the operation can normally be expressed more concisely using any_of(),
all_of(), or none_of().
- Add AlertWindow::show() and showAsync() methods that take a MessageBoxOptions argument
- Add NativeMessageBox::show() and showAsync() methods that take a MessageBoxOptions argument
- Update the DialogsDemo to demonstrate the new methods
- Deprecate AlertWindow::showNativeDialogBox() in favour of the NativeMessageBox methods
- Pass button strings specified in MesssageBoxOptions to native dialog boxes correctly
- Use modern TaskDialog on Windows for the native dialog box where available
When loading exporter icons on a background save thread we need to take the MessageManagerLock as the image file may be an SVG which has a message thread dependency in the Drawable parsing code