mirror of
https://github.com/atom/atom.git
synced 2026-02-02 02:35:00 -05:00
Make atom.update() work.
This commit is contained in:
@@ -244,7 +244,7 @@ window.atom =
|
||||
windowState
|
||||
|
||||
update: ->
|
||||
throw new Error('atom.update is not implemented')
|
||||
ipc.sendChannel 'install-update'
|
||||
|
||||
getUpdateStatus: (callback) ->
|
||||
throw new Error('atom.getUpdateStatus is not implemented')
|
||||
|
||||
@@ -35,6 +35,7 @@ class AtomApplication
|
||||
configWindow: null
|
||||
menu: null
|
||||
resourcePath: null
|
||||
installUpdate: null
|
||||
version: null
|
||||
|
||||
constructor: ({@resourcePath, pathsToOpen, @version, test, pidToKillWhenClosed, @dev}) ->
|
||||
@@ -187,6 +188,7 @@ class AtomApplication
|
||||
|
||||
autoUpdater.on 'ready-for-update-on-quit', (event, version, quitAndUpdate) =>
|
||||
event.preventDefault()
|
||||
@installUpdate = quitAndUpdate
|
||||
@buildApplicationMenu version, quitAndUpdate
|
||||
|
||||
ipc.on 'close-without-confirm', (processId, routingId) ->
|
||||
@@ -206,6 +208,9 @@ class AtomApplication
|
||||
ipc.on 'new-window', =>
|
||||
@open()
|
||||
|
||||
ipc.on 'install-update', =>
|
||||
@installUpdate?()
|
||||
|
||||
ipc.on 'get-version', (event) =>
|
||||
event.result = @version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user