mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
not ready for this yet. focusing on one window for now.
This commit is contained in:
@@ -45,16 +45,17 @@
|
||||
|
||||
path = [[[panel URLs] lastObject] path];
|
||||
}
|
||||
|
||||
for (AtomController *controller in controllers) {
|
||||
JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"canOpen" withArguments:path, nil];
|
||||
if ([controller.jscocoa toBool:value]) {
|
||||
[controller.jscocoa callJSFunctionNamed:@"open" withArguments:path, nil];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[self createController:path];
|
||||
|
||||
// Not ready for this yet. window.open calls app.open
|
||||
// for (AtomController *controller in controllers) {
|
||||
// JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"canOpen" withArguments:path, nil];
|
||||
// if ([controller.jscocoa toBool:value]) {
|
||||
// [controller.jscocoa callJSFunctionNamed:@"open" withArguments:path, nil];
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
[self createController:path];
|
||||
}
|
||||
|
||||
// Events in the "app:*" namespace get sent to all controllers
|
||||
|
||||
@@ -56,11 +56,7 @@ windowAdditions =
|
||||
atom.trigger arguments...
|
||||
|
||||
canOpen: (path) ->
|
||||
parent = @path.replace(/([^\/])$/, "$1/")
|
||||
child = path.replace(/([^\/])$/, "$1/")
|
||||
|
||||
# If the child is contained by the parent, it can be opened by this window
|
||||
child.match "^" + parent
|
||||
false
|
||||
|
||||
for key, value of windowAdditions
|
||||
console.warn "DOMWindow already has a key named `#{key}`" if window[key]
|
||||
|
||||
Reference in New Issue
Block a user