Skip to content

Commit

Permalink
Pass the load settings through so all windows share devMode and safeMode
Browse files Browse the repository at this point in the history
  • Loading branch information
benogle committed Dec 19, 2014
1 parent e688df5 commit 80c828d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/browser/atom-application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ class AtomApplication
@on 'application:quit', -> app.quit()
@on 'application:new-window', -> @openPath(windowDimensions: @focusedWindow()?.getDimensions())
@on 'application:new-file', -> (@focusedWindow() ? this).openPath()
@on 'application:open', -> @promptForPath(type: 'all')
@on 'application:open-file', -> @promptForPath(type: 'file')
@on 'application:open-folder', -> @promptForPath(type: 'folder')
@on 'application:open', (loadSettings) -> @promptForPath(_.extend(type: 'all', loadSettings))
@on 'application:open-file', (loadSettings) -> @promptForPath(_.extend(type: 'file', loadSettings))
@on 'application:open-folder', (loadSettings) -> @promptForPath(_.extend(type: 'folder', loadSettings))
@on 'application:open-dev', -> @promptForPath(devMode: true)
@on 'application:open-safe', -> @promptForPath(safeMode: true)
@on 'application:inspect', ({x,y, atomWindow}) ->
Expand Down Expand Up @@ -227,8 +227,8 @@ class AtomApplication
ipc.on 'run-package-specs', (event, specDirectory) =>
@runSpecs({resourcePath: global.devResourcePath, specDirectory: specDirectory, exitWhenDone: false})

ipc.on 'command', (event, command) =>
@emit(command)
ipc.on 'command', (event, command, options) =>
@emit(command, options)

ipc.on 'window-command', (event, command, args...) ->
win = BrowserWindow.fromWebContents(event.sender)
Expand Down
6 changes: 3 additions & 3 deletions src/workspace-element.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ atom.commands.add 'atom-workspace',
'application:unhide-all-applications': -> ipc.send('command', 'application:unhide-all-applications')
'application:new-window': -> ipc.send('command', 'application:new-window')
'application:new-file': -> ipc.send('command', 'application:new-file')
'application:open': -> ipc.send('command', 'application:open')
'application:open-file': -> ipc.send('command', 'application:open-file')
'application:open-folder': -> ipc.send('command', 'application:open-folder')
'application:open': -> ipc.send('command', 'application:open', devMode: atom.inDevMode(), safeMode: atom.inSafeMode())
'application:open-file': -> ipc.send('command', 'application:open-file', devMode: atom.inDevMode(), safeMode: atom.inSafeMode())
'application:open-folder': -> ipc.send('command', 'application:open-folder', devMode: atom.inDevMode(), safeMode: atom.inSafeMode())
'application:open-dev': -> ipc.send('command', 'application:open-dev')
'application:open-safe': -> ipc.send('command', 'application:open-safe')
'application:minimize': -> ipc.send('command', 'application:minimize')
Expand Down

0 comments on commit 80c828d

Please sign in to comment.