window.atom, window.atom.app

This commit is contained in:
Chris Wanstrath
2011-11-09 12:15:19 -08:00
parent e182b6c2ae
commit 289fbb032f
3 changed files with 9 additions and 7 deletions

View File

@@ -4,12 +4,12 @@ require 'window'
module.exports =
class App
@startup: ->
constructor: ->
KeyBinder.register "app", @
window.startup()
@open: (path) ->
open: (path) ->
OSX.NSApp.open path
@quit: ->
OSX.NSApp.terminate null
quit: ->
OSX.NSApp.terminate null

View File

@@ -30,8 +30,7 @@ class Native
@openURL: (url) ->
window.location = url
App = require 'app'
App.activeWindow.setTitle _.last url.replace(/\/$/,'').split '/'
atom.app.activeWindow.setTitle _.last url.replace(/\/$/,'').split '/'
# Returns null or a file path.
@savePanel: ->

View File

@@ -1,3 +1,6 @@
# Like sands through the hourglass, so are the days of our lives.
App = require 'app'
App.startup()
window.atom = {}
window.atom.app = new App