window.path is now window.url

This commit is contained in:
Corey Johnson
2011-11-11 11:24:50 -08:00
parent 4052efcab4
commit a2fdd0fd16
6 changed files with 20 additions and 20 deletions

View File

@@ -38,7 +38,7 @@ class FilefinderPane extends Pane
paths: ->
_paths = []
for dir in File.list window.path
for dir in File.list window.url
continue if /\.git|Cocoa/.test dir
_paths.push File.listDirectoryTree dir
_.reject _.flatten(_paths), (dir) -> File.isDirectory dir
@@ -47,7 +47,7 @@ class FilefinderPane extends Pane
@modal.show()
@files = []
for file in @paths()
@files.push file.replace "#{window.path}/", ''
@files.push file.replace "#{window.url}/", ''
@filterFiles()
findMatchingFiles: (query) ->
@@ -80,7 +80,7 @@ class FilefinderPane extends Pane
$('#filefinder li:first').addClass 'selected'
openSelected: ->
dir = window.path
dir = window.url
file = $('#filefinder .selected').text()
window.open "#{dir}/#{file}"
@toggle()

View File

@@ -46,7 +46,7 @@ class TreePane extends Pane
true
reload: ->
@html.children('#tree .cwd').text _.last window.path.split '/'
@html.children('#tree .cwd').text _.last window.url.split '/'
fileList = @createList @tree.paths
fileList.addClass 'files'
@html.children('#tree .files').replaceWith fileList

View File

@@ -18,7 +18,7 @@ class Tree extends Extension
atom.keybinder.load require.resolve "tree/key-bindings.coffee"
# watch the root dir
Watcher.watch window.path, @watchDir
Watcher.watch window.url, @watchDir
# Hide dirs that no longer exist, watch dirs that do.
for dir in @shownDirs()
@@ -27,25 +27,25 @@ class Tree extends Extension
else
Watcher.watch dir, @watchDir
@paths = @findPaths window.path
@paths = @findPaths window.url
@pane = new TreePane @
startup: ->
@pane.show()
shutdown: ->
@unwatchDir window.path
@unwatchDir window.url
@unwatchDir dir for dir in @shownDirs()
reload: ->
@pane.reload()
shownDirStorageKey: ->
@.constructor.name + ":" + window.path + ":shownDirs"
@.constructor.name + ":" + window.url + ":shownDirs"
watchDir: (changeType, dir) =>
# Update the paths
@paths = @findPaths window.path
@paths = @findPaths window.url
@pane.reload()
unwatchDir: (dir) ->