'meta-o' presents open dialog.

This commit is contained in:
Corey Johnson
2011-12-20 10:41:31 -08:00
parent f2d9f818a8
commit d0ed5992ca
4 changed files with 32 additions and 6 deletions

View File

@@ -27,6 +27,10 @@ windowAdditions =
if String.fromCharCode(event.which) == 'S' and event.metaKey
@editor.save()
if String.fromCharCode(event.which) == 'O' and event.metaKey
url = atom.native.openPanel()
@editor.open(url) if url
unbindKeys: ->
$(document).unbind 'keydown'

View File

@@ -26,11 +26,7 @@ class Native
return null
filename = panel.filenames.lastObject
localStorage.lastOpenedPath = filename
filename.toString()
openURL: (url) ->
window.location = url
atom.app.activeWindow.setTitle _.last url.replace(/\/$/,'').split '/'
filename.valueOf()
# Returns null or a file path.
savePanel: ->