mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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
|
|
@ -339,7 +339,7 @@ private:
|
|||
auto result = Result::fail (TRANS ("The file doesn't exist"));
|
||||
|
||||
if (showMessageOnFailure)
|
||||
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("Failed to open file..."),
|
||||
TRANS ("There was an error while trying to load the file: FLNM")
|
||||
.replace ("FLNM", "\n" + newFile.getFullPathName())
|
||||
|
|
@ -448,7 +448,7 @@ private:
|
|||
callback (parent, alertResult);
|
||||
});
|
||||
|
||||
return AlertWindow::showYesNoCancelBox (AlertWindow::QuestionIcon,
|
||||
return AlertWindow::showYesNoCancelBox (MessageBoxIconType::QuestionIcon,
|
||||
TRANS ("Closing document..."),
|
||||
TRANS ("Do you want to save the changes to \"DCNM\"?")
|
||||
.replace ("DCNM", document.getDocumentTitle()),
|
||||
|
|
@ -510,7 +510,7 @@ private:
|
|||
MouseCursor::hideWaitCursor();
|
||||
|
||||
if (showMessageOnFailure)
|
||||
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
|
||||
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("Error writing to file..."),
|
||||
TRANS ("An error occurred while trying to save \"DCNM\" to the file: FLNM")
|
||||
.replace ("DCNM", parent->document.getDocumentTitle())
|
||||
|
|
@ -682,7 +682,7 @@ private:
|
|||
callback (parent, r == 1);
|
||||
});
|
||||
|
||||
return AlertWindow::showOkCancelBox (AlertWindow::WarningIcon,
|
||||
return AlertWindow::showOkCancelBox (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("File already exists"),
|
||||
TRANS ("There's already a file called: FLNM")
|
||||
.replace ("FLNM", newFile.getFullPathName())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue