mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
'meta-o' presents open dialog.
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
@@ -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: ->
|
||||
|
||||
Reference in New Issue
Block a user