mirror of
https://github.com/atom/atom.git
synced 2026-02-02 18:55:17 -05:00
Open file when received 'open-file' event.
This event is emitted when the OS X opens files with Atom.
This commit is contained in:
@@ -139,6 +139,10 @@ class AtomApplication
|
||||
app.on 'window-all-closed', ->
|
||||
app.quit()
|
||||
|
||||
app.on 'open-file', (event, filePath) =>
|
||||
event.preventDefault()
|
||||
@openPath filePath
|
||||
|
||||
ipc.on 'close-without-confirm', (processId, routingId) ->
|
||||
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
||||
window.removeAllListeners 'close'
|
||||
|
||||
Reference in New Issue
Block a user