focus new window, add Chrome.openURL

This commit is contained in:
Chris Wanstrath
2011-08-23 10:34:46 -07:00
parent 72bb316590
commit ce673218e7

View File

@@ -12,6 +12,7 @@ Chrome =
createWindow: (path) ->
c = OSX.AtomWindowController.alloc.initWithWindowNibName "AtomWindow"
c.window
c.window.makeKeyAndOrderFront null
# Set the active window's dirty status.
setDirty: (bool) ->
@@ -44,6 +45,11 @@ Chrome =
pb.declareTypes_owner [OSX.NSStringPboardType], null
pb.setString_forType text, OSX.NSStringPboardType
openURL: (url) ->
c = OSX.AtomWindowController.alloc.initWithURL url
c.window
c.window.makeKeyAndOrderFront null
# name - Command name, like "Find in file"
# shortcut - String command name, e.g.
# "Command-T"