mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-24 04:59:47 -05:00
work around Electron dialog title bug
In previous versions of this app, Electron automaticaly put "Scratch" in the title bar for these dialogs. See https://github.com/electron/electron/issues/30223
This commit is contained in:
parent
c5caa7acc5
commit
2ba74d7ac0
1 changed files with 2 additions and 0 deletions
|
@ -292,6 +292,7 @@ const createMainWindow = () => {
|
||||||
// don't clean up until after the message box to allow troubleshooting / recovery
|
// don't clean up until after the message box to allow troubleshooting / recovery
|
||||||
await dialog.showMessageBox(window, {
|
await dialog.showMessageBox(window, {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
title: 'Failed to save project',
|
||||||
message: `Save failed:\n${userChosenPath}`,
|
message: `Save failed:\n${userChosenPath}`,
|
||||||
detail: e.message
|
detail: e.message
|
||||||
});
|
});
|
||||||
|
@ -312,6 +313,7 @@ const createMainWindow = () => {
|
||||||
|
|
||||||
webContents.on('will-prevent-unload', ev => {
|
webContents.on('will-prevent-unload', ev => {
|
||||||
const choice = dialog.showMessageBoxSync(window, {
|
const choice = dialog.showMessageBoxSync(window, {
|
||||||
|
title: productName,
|
||||||
type: 'question',
|
type: 'question',
|
||||||
message: 'Leave Scratch?',
|
message: 'Leave Scratch?',
|
||||||
detail: 'Any unsaved changes will be lost.',
|
detail: 'Any unsaved changes will be lost.',
|
||||||
|
|
Loading…
Reference in a new issue