This commit is contained in:
Corey Johnson
2014-02-25 16:25:58 -08:00
parent 42bce0d438
commit a80fcff81c
2 changed files with 7 additions and 1 deletions

View File

@@ -87,7 +87,7 @@
"metrics": "0.28.0",
"open-on-github": "0.21.0",
"package-generator": "0.28.0",
"release-notes": "0.23.0",
"release-notes": "0.24.0",
"settings-view": "0.82.0",
"snippets": "0.32.0",
"spell-check": "0.26.0",

View File

@@ -133,20 +133,25 @@ class AtomApplication
autoUpdater.setFeedUrl "https://atom.io/api/updates?version=#{@version}"
autoUpdater.on 'checking-for-update', =>
console.log "-------checking for update"
@applicationMenu.showInstallUpdateItem(false)
@applicationMenu.showCheckForUpdateItem(false)
autoUpdater.on 'update-not-available', =>
console.log "-------update-not-available"
@applicationMenu.showInstallUpdateItem(false)
@applicationMenu.showCheckForUpdateItem(true)
autoUpdater.on 'update-downloaded', (event, releaseNotes, releaseName, releaseDate, releaseURL) =>
console.log "-------update-downloaded"
atomWindow.sendCommand('window:update-available', releaseName) for atomWindow in @windows
@applicationMenu.showInstallUpdateItem(true)
@applicationMenu.showCheckForUpdateItem(false)
@updateVersion = releaseName
autoUpdater.on 'error', (event, message) =>
console.log "-------error"
console.log event, message
@applicationMenu.showInstallUpdateItem(false)
@applicationMenu.showCheckForUpdateItem(true)
@@ -155,6 +160,7 @@ class AtomApplication
checkForUpdate: ->
autoUpdater.once 'update-available', ->
console.log "-------update-available!"
dialog.showMessageBox
type: 'info'
buttons: ['OK']