From 57c18e784ef502af98e09686a3e5d27c353f5b5c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 Jun 2012 14:58:25 -0700 Subject: [PATCH] Create bootstrap script for atom in single window mode --- Atom-Linux/client_handler.cpp | 2 +- src/single-window-bootstrap.coffee | 3 +++ src/window-bootstrap.coffee | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/single-window-bootstrap.coffee diff --git a/Atom-Linux/client_handler.cpp b/Atom-Linux/client_handler.cpp index 5923ca801..4767af918 100644 --- a/Atom-Linux/client_handler.cpp +++ b/Atom-Linux/client_handler.cpp @@ -95,7 +95,7 @@ void ClientHandler::OnLoadStart(CefRefPtr browser, atom->SetValue("loadPath", loadPath, V8_PROPERTY_ATTRIBUTE_NONE); CefRefPtr bootstrapScript = CefV8Value::CreateString( - "window-bootstrap"); + "single-window-bootstrap"); global->SetValue("$bootstrapScript", bootstrapScript, V8_PROPERTY_ATTRIBUTE_NONE); diff --git a/src/single-window-bootstrap.coffee b/src/single-window-bootstrap.coffee new file mode 100644 index 000000000..1795f2db8 --- /dev/null +++ b/src/single-window-bootstrap.coffee @@ -0,0 +1,3 @@ +# Bootstrap the app in a single window mode +require 'atom-bootstrap.coffee' +require 'window-bootstrap.coffee' \ No newline at end of file diff --git a/src/window-bootstrap.coffee b/src/window-bootstrap.coffee index d1286fa4e..cd8207efe 100644 --- a/src/window-bootstrap.coffee +++ b/src/window-bootstrap.coffee @@ -1,6 +1,4 @@ # 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