From 2c30ba36b399185fcd426edb613508d57167ea28 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sun, 3 Jun 2012 19:19:09 -0700 Subject: [PATCH] Testing tweaks to operate Atom in single window mode --- src/app/window.coffee | 2 +- src/window-bootstrap.coffee | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/window.coffee b/src/app/window.coffee index 93f748833..9d7e23667 100644 --- a/src/app/window.coffee +++ b/src/app/window.coffee @@ -41,7 +41,7 @@ windowAdditions = # Note: RootView assigns itself on window on initialization so that # window.rootView is available when loading user configuration attachRootView: (pathToOpen) -> - if rootViewState = atom.rootViewStates[$windowNumber] + if rootViewState = atom.rootViewStates?[$windowNumber] RootView.deserialize(JSON.parse(rootViewState)) else new RootView(pathToOpen) diff --git a/src/window-bootstrap.coffee b/src/window-bootstrap.coffee index cd8207efe..d1286fa4e 100644 --- a/src/window-bootstrap.coffee +++ b/src/window-bootstrap.coffee @@ -1,4 +1,6 @@ # Like sands through the hourglass, so are the days of our lives. require 'window' +Atom = require 'atom' +window.atom = new Atom(atom.loadPath, $native) window.startup $pathToOpen