Use toggleDevTools instead of showDevTools. Fixes atom/atom-shell#8.

Currently the toggleDevTools of atom-shell is simulated by keeping state
of devtools, because there is no way to know the state of devtools in
brightray, so it could not behave correctly sometimes.

This problem will be solved when brightray is patched and atom-shel gets
updated.
This commit is contained in:
Cheng Zhao
2013-05-17 18:57:30 +08:00
parent e7b35d27e7
commit d1ca0a8f8f
3 changed files with 4 additions and 4 deletions

View File

@@ -202,9 +202,9 @@ window.atom =
else
@pendingModals[stackSize - 1].shift()
showDevTools: ->
toggleDevTools: ->
currentWindow = require('remote').getCurrentWindow()
currentWindow.openDevTools()
currentWindow.toggleDevTools()
focus: ->
@sendMessageToBrowserProcess('focus')

View File

@@ -34,7 +34,7 @@ class Keymap
$(document).command 'open-user-configuration', => atom.openConfig()
$(document).command 'open', => atom.open()
$(document).command 'open-dev', => atom.openDev()
$(document).command 'toggle-dev-tools', => atom.showDevTools()
$(document).command 'toggle-dev-tools', => atom.toggleDevTools()
loadBundledKeymaps: ->
@loadDirectory(fsUtils.resolveOnLoadPath('keymaps'))

View File

@@ -229,7 +229,7 @@ window.reload = ->
$native.reload()
window.onerror = ->
atom.showDevTools()
atom.toggleDevTools()
window.registerDeserializers = (args...) ->
registerDeserializer(arg) for arg in args