Inline buttons and cancelId values

This commit is contained in:
Kevin Sawicki 2016-11-29 13:30:28 -08:00
parent 3ac9858726
commit 72e559458f

View file

@ -8,17 +8,14 @@ window.onload = function () {
window.confirm = function (message, title) { window.confirm = function (message, title) {
const {dialog} = require('electron').remote const {dialog} = require('electron').remote
let buttons, cancelId
if (title == null) { if (title == null) {
title = '' title = ''
} }
buttons = ['OK', 'Cancel']
cancelId = 1
return !dialog.showMessageBox({ return !dialog.showMessageBox({
message: message, message: message,
title: title, title: title,
buttons: buttons, buttons: ['OK', 'Cancel'],
cancelId: cancelId cancelId: 1
}) })
} }