mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -202,9 +202,9 @@ window.atom =
|
||||
else
|
||||
@pendingModals[stackSize - 1].shift()
|
||||
|
||||
showDevTools: ->
|
||||
toggleDevTools: ->
|
||||
currentWindow = require('remote').getCurrentWindow()
|
||||
currentWindow.openDevTools()
|
||||
currentWindow.toggleDevTools()
|
||||
|
||||
focus: ->
|
||||
@sendMessageToBrowserProcess('focus')
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -229,7 +229,7 @@ window.reload = ->
|
||||
$native.reload()
|
||||
|
||||
window.onerror = ->
|
||||
atom.showDevTools()
|
||||
atom.toggleDevTools()
|
||||
|
||||
window.registerDeserializers = (args...) ->
|
||||
registerDeserializer(arg) for arg in args
|
||||
|
||||
Reference in New Issue
Block a user