mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Update other uses of .confirm for new async API
This commit is contained in:
@@ -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.'
|
||||
}, () => {})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user