mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
atomController is now known as $atomController.
This commit is contained in:
@@ -92,7 +92,6 @@
|
||||
|
||||
NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:YES], @"WebKitDeveloperExtras",
|
||||
[NSNumber numberWithBool:YES], @"WebKitScriptDebuggerEnabled",
|
||||
nil];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
[self setWindowFrameAutosaveName:@"atomController"];
|
||||
|
||||
jscocoa = [[JSCocoa alloc] initWithGlobalContext:[[webView mainFrame] globalContext]];
|
||||
[jscocoa setObject:self withName:@"atomController"];
|
||||
[jscocoa setObject:self withName:@"$atomController"];
|
||||
|
||||
NSURL *resourceURL = [[NSBundle mainBundle] resourceURL];
|
||||
NSURL *indexURL = [resourceURL URLByAppendingPathComponent:@"index.html"];
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<script src='src/require.js'></script>
|
||||
<script>
|
||||
window.onerror = function() {
|
||||
atomController.webView.inspector.showConsole(true)
|
||||
window.showConsole(true)
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
|
||||
@@ -20,10 +20,12 @@ windowAdditions =
|
||||
|
||||
appRoot: OSX.NSBundle.mainBundle.resourcePath
|
||||
|
||||
path: null
|
||||
|
||||
startup: () ->
|
||||
KeyBinder.register "window", window
|
||||
|
||||
@path = atomController.path
|
||||
@path = $atomController.path
|
||||
@setTitle _.last @path.split '/'
|
||||
|
||||
@editor = new Editor
|
||||
@@ -71,24 +73,23 @@ windowAdditions =
|
||||
require "~/.atomicity/settings.coffee"
|
||||
|
||||
showConsole: ->
|
||||
atomController.webView.inspector.showConsole true
|
||||
$atomController.webView.inspector.showConsole true
|
||||
|
||||
setTitle: (title) ->
|
||||
atomController.window.title = title
|
||||
$atomController.window.title = title
|
||||
|
||||
reload: ->
|
||||
atomController.close
|
||||
$atomController.close
|
||||
OSX.NSApp.createController @path
|
||||
|
||||
# Do open and close even belong here?
|
||||
open: (path) ->
|
||||
atomController.window.makeKeyAndOrderFront atomController
|
||||
$atomController.window.makeKeyAndOrderFront atomController
|
||||
Event.trigger 'window:open', path
|
||||
|
||||
close: (path) ->
|
||||
extension.shutdown() for name, extension of @extensions
|
||||
|
||||
atomController.close
|
||||
$atomController.close
|
||||
Event.trigger 'window:close', path
|
||||
|
||||
# Global methods that are used by the cocoa side of things
|
||||
|
||||
Reference in New Issue
Block a user