mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Add MessageBoxOptions class for specifying a set of AlertWindow and NativeMessageBox options
- 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
This commit is contained in:
parent
89ca17cf34
commit
551d7b9c5b
54 changed files with 1357 additions and 595 deletions
|
|
@ -194,7 +194,7 @@ void FileChooserDialogBox::okButtonPressed()
|
|||
&& content->chooserComponent.isSaveMode()
|
||||
&& content->chooserComponent.getSelectedFile(0).exists())
|
||||
{
|
||||
AlertWindow::showOkCancelBox (AlertWindow::WarningIcon,
|
||||
AlertWindow::showOkCancelBox (MessageBoxIconType::WarningIcon,
|
||||
TRANS("File already exists"),
|
||||
TRANS("There's already a file called: FLNM")
|
||||
.replace ("FLNM", content->chooserComponent.getSelectedFile(0).getFullPathName())
|
||||
|
|
@ -229,7 +229,7 @@ void FileChooserDialogBox::createNewFolder()
|
|||
{
|
||||
auto* aw = new AlertWindow (TRANS("New Folder"),
|
||||
TRANS("Please enter the name for the folder"),
|
||||
AlertWindow::NoIcon, this);
|
||||
MessageBoxIconType::NoIcon, this);
|
||||
|
||||
aw->addTextEditor ("Folder Name", String(), String(), false);
|
||||
aw->addButton (TRANS("Create Folder"), 1, KeyPress (KeyPress::returnKey));
|
||||
|
|
@ -251,7 +251,7 @@ void FileChooserDialogBox::createNewFolderConfirmed (const String& nameFromDialo
|
|||
auto parent = content->chooserComponent.getRoot();
|
||||
|
||||
if (! parent.getChildFile (name).createDirectory())
|
||||
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("New Folder"),
|
||||
TRANS ("Couldn't create the folder!"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue