From 941a3d8bf88c59ae4f006d6f9431fdf7ec45ce9d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 30 May 2013 16:13:25 +0800 Subject: [PATCH] Open file when received 'open-file' event. This event is emitted when the OS X opens files with Atom. --- src/atom-application.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/atom-application.coffee b/src/atom-application.coffee index bb8dce0a9..da51cc3c3 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -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'