Make dialog.showMessageBox asynchronous.

This commit is contained in:
Cheng Zhao 2013-09-23 14:29:55 +08:00
parent b70722feb6
commit 85d6588661
3 changed files with 56 additions and 9 deletions

View file

@ -30,8 +30,10 @@ module.exports =
binding.showSaveDialog window, options.title, options.defaultPath
showMessageBox: (window, options) ->
showMessageBox: (window, options, callback) ->
if window? and window.constructor isnt BrowserWindow
# Shift.
callback = options
options = window
window = null
@ -51,4 +53,5 @@ module.exports =
String(options.title),
String(options.message),
String(options.detail),
window
window,
callback