mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Send check-for-update message over ipc
This commit is contained in:
committed by
Ben Ogle
parent
44d7832745
commit
6fce680a28
@@ -304,6 +304,9 @@ class AtomApplication
|
||||
ipcMain.on 'execute-javascript-in-dev-tools', (event, code) ->
|
||||
event.sender.devToolsWebContents?.executeJavaScript(code)
|
||||
|
||||
ipcMain.on 'check-for-update', =>
|
||||
@autoUpdateManager.check()
|
||||
|
||||
setupDockMenu: ->
|
||||
if process.platform is 'darwin'
|
||||
dockMenu = Menu.buildFromTemplate [
|
||||
|
||||
@@ -3,6 +3,7 @@ _ = require 'underscore-plus'
|
||||
Config = require '../config'
|
||||
{EventEmitter} = require 'events'
|
||||
path = require 'path'
|
||||
ipc = require 'ipc'
|
||||
|
||||
IdleState = 'idle'
|
||||
CheckingState = 'checking'
|
||||
@@ -47,7 +48,7 @@ class AutoUpdateManager
|
||||
|
||||
autoUpdater.on 'update-available', =>
|
||||
@setState(DownladingState)
|
||||
# We use sendMessage to send an event called 'update-available' below
|
||||
# We use sendMessage to send an event called 'update-available' in 'update-downloaded'
|
||||
# once the update download is complete. This mismatch between the electron
|
||||
# autoUpdater events is unfortunate but in the interest of not changing the
|
||||
# one existing event handled by applicationDelegate
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use babel'
|
||||
|
||||
import {Emitter, CompositeDisposable} from 'event-kit'
|
||||
import ipc from 'ipc'
|
||||
|
||||
export default class Update {
|
||||
constructor () {
|
||||
@@ -55,10 +56,6 @@ export default class Update {
|
||||
}
|
||||
|
||||
check () {
|
||||
// TODO
|
||||
}
|
||||
|
||||
getState () {
|
||||
// TODO
|
||||
ipc.send('check-for-update')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user