mirror of
https://github.com/atom/atom.git
synced 2026-02-16 09:35:54 -05:00
Add back ability to open an arbitrary window
atom.open now takes an options has that can contain either pathsToOpen or the complete settings of a new window. This will be used by the collaboration package to open the window when a session is being joined.
This commit is contained in:
@@ -2,6 +2,7 @@ fsUtils = require 'fs-utils'
|
||||
path = require 'path'
|
||||
telepath = require 'telepath'
|
||||
$ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
less = require 'less'
|
||||
remote = require 'remote'
|
||||
ipc = require 'ipc'
|
||||
@@ -86,8 +87,8 @@ window.installApmCommand = (callback) ->
|
||||
window.onDrop = (e) ->
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
for file in e.originalEvent.dataTransfer.files
|
||||
atom.open(file.path)
|
||||
pathsToOpen = _.pluck(e.originalEvent.dataTransfer.files, 'path')
|
||||
atom.open({pathsToOpen}) if pathsToOpen.length > 0
|
||||
|
||||
window.deserializeEditorWindow = ->
|
||||
RootView = require 'root-view'
|
||||
|
||||
Reference in New Issue
Block a user