From 3d9f6bc6646f72411accfe7627d7cef9374db6c7 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Sat, 18 Nov 2017 01:46:39 +0100 Subject: [PATCH] Update other uses of .confirm for new async API --- src/command-installer.js | 4 ++-- src/pane.js | 2 +- src/workspace.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command-installer.js b/src/command-installer.js index 225547ef4..85360da17 100644 --- a/src/command-installer.js +++ b/src/command-installer.js @@ -23,7 +23,7 @@ class CommandInstaller { const showErrorDialog = (error) => { this.applicationDelegate.confirm({ message: 'Failed to install shell commands', - detailedMessage: error.message + detail: error.message }, () => {}) } @@ -33,7 +33,7 @@ class CommandInstaller { if (error) return showErrorDialog(error) this.applicationDelegate.confirm({ message: 'Commands installed.', - detailedMessage: 'The shell commands `atom` and `apm` are installed.' + detail: 'The shell commands `atom` and `apm` are installed.' }, () => {}) }) }) diff --git a/src/pane.js b/src/pane.js index 502c1e125..cfa281041 100644 --- a/src/pane.js +++ b/src/pane.js @@ -809,7 +809,7 @@ class Pane { const saveDialog = (saveButtonText, saveFn, message) => { this.applicationDelegate.confirm({ message, - detailedMessage: 'Your changes will be lost if you close this item without saving.', + detail: 'Your changes will be lost if you close this item without saving.', buttons: [saveButtonText, 'Cancel', "&Don't Save"] }, response => { switch (response) { diff --git a/src/workspace.js b/src/workspace.js index 8e9d3b2df..e2e7f6165 100644 --- a/src/workspace.js +++ b/src/workspace.js @@ -1224,7 +1224,7 @@ module.exports = class Workspace extends Model { if (fileSize >= (this.config.get('core.warnOnLargeFileLimit') * 1048576)) { // 40MB by default this.applicationDelegate.confirm({ message: 'Atom will be unresponsive during the loading of very large files.', - detailedMessage: 'Do you still want to load this file?', + detail: 'Do you still want to load this file?', buttons: ['Proceed', 'Cancel'] }, response => { if (response === 1) { @@ -2013,7 +2013,7 @@ module.exports = class Workspace extends Model { if (this.config.get('editor.confirmCheckoutHeadRevision')) { this.applicationDelegate.confirm({ message: 'Confirm Checkout HEAD Revision', - detailedMessage: `Are you sure you want to discard all changes to "${editor.getFileName()}" since the last Git commit?`, + detail: `Are you sure you want to discard all changes to "${editor.getFileName()}" since the last Git commit?`, buttons: ['OK', 'Cancel'] }, response => { if (response === 0) checkoutHead()