Update other uses of .confirm for new async API

This commit is contained in:
Wliu
2017-11-18 01:46:39 +01:00
parent b881edac06
commit 3d9f6bc664
3 changed files with 5 additions and 5 deletions

View File

@@ -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.'
}, () => {})
})
})

View File

@@ -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) {

View File

@@ -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()