Merge branch 'master' into wl-electron-35

This commit is contained in:
Cheng Zhao
2015-12-11 09:32:32 +08:00
59 changed files with 1080 additions and 554 deletions

View File

@@ -77,6 +77,7 @@ class AtomApplication
@listenForArgumentsFromNewProcess()
@setupJavaScriptArguments()
@handleEvents()
@setupDockMenu()
@storageFolder = new StorageFolder(process.env.ATOM_HOME)
if options.pathsToOpen?.length > 0 or options.urlsToOpen?.length > 0 or options.test
@@ -275,6 +276,16 @@ class AtomApplication
ipcMain.on 'write-to-stderr', (event, output) ->
process.stderr.write(output)
ipc.on 'add-recent-document', (event, filename) ->
app.addRecentDocument(filename)
setupDockMenu: ->
if process.platform is 'darwin'
dockMenu = Menu.buildFromTemplate [
{label: 'New Window', click: => @emit('application:new-window')}
]
app.dock.setMenu dockMenu
# Public: Executes the given command.
#
# If it isn't handled globally, delegate to the currently focused window.