mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
window.close() calls resource.close()
this is similar to resource.open(). the return value of resource.close() determines whether window should stop or bubble it up to app.close()
This commit is contained in:
@@ -5,6 +5,7 @@ app:
|
||||
window:
|
||||
'cmd-shift-I': (window) -> window.showConsole()
|
||||
'cmd-r': (window) -> window.reload()
|
||||
'cmd-w': (window) -> window.close()
|
||||
'cmd-o': (window) -> window.open()
|
||||
'cmd-O': (window) -> window.open window.prompt "Open URL:"
|
||||
'cmd-s': (window) -> window.save()
|
||||
@@ -15,7 +16,6 @@ window:
|
||||
s.src = 'http://erkie.github.com/asteroids.min.js'
|
||||
|
||||
editor:
|
||||
'cmd-w': 'close'
|
||||
'cmd-shift-s': 'saveAs'
|
||||
'cmd-c': 'copy'
|
||||
'cmd-x': 'cut'
|
||||
|
||||
@@ -22,6 +22,7 @@ windowAdditions =
|
||||
throw "I DON'T KNOW ABOUT #{@url}" if not success
|
||||
|
||||
shutdown: ->
|
||||
$atomController.close
|
||||
|
||||
showConsole: ->
|
||||
$atomController.webView.inspector.showConsole true
|
||||
@@ -30,20 +31,19 @@ windowAdditions =
|
||||
$atomController.window.title = title
|
||||
|
||||
reload: ->
|
||||
@close()
|
||||
@shutdown()
|
||||
OSX.NSApp.createController @url
|
||||
|
||||
open: (url) ->
|
||||
url = atom.native.openPanel() unless url
|
||||
(@resource.open url) or atom.app.open url
|
||||
|
||||
close: ->
|
||||
@resource.close() or @shutdown()
|
||||
|
||||
save: ->
|
||||
@resource.save()
|
||||
|
||||
close: (url) ->
|
||||
@shutdown()
|
||||
$atomController.close
|
||||
|
||||
handleKeyEvent: ->
|
||||
atom.keybinder.handleEvent arguments...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user