mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Pluralize Project API
This changes all APIs concerning paths and repositories on the project to be plural, preparing us to switch to multi-folder projects. It doesn’t make any changes to actually support multiple folders. Instead we just wrap the previous return values in singleton arrays. * constructor ‘path’ params -> ‘paths’ * getRootDirectory -> getDirectories * getPath -> getPaths * setPath -> setPaths * getRepo -> getRepositories
This commit is contained in:
@@ -136,7 +136,7 @@ class WorkspaceView extends View
|
||||
if process.platform is 'darwin'
|
||||
@command 'window:install-shell-commands', => @installShellCommands()
|
||||
|
||||
@command 'window:run-package-specs', -> ipc.send('run-package-specs', path.join(atom.project.getPath(), 'spec'))
|
||||
@command 'window:run-package-specs', -> ipc.send('run-package-specs', path.join(atom.project.getPaths()[0], 'spec'))
|
||||
|
||||
@command 'window:focus-next-pane', => @focusNextPaneView()
|
||||
@command 'window:focus-previous-pane', => @focusPreviousPaneView()
|
||||
@@ -367,7 +367,7 @@ class WorkspaceView extends View
|
||||
# Updates the application's title and proxy icon based on whichever file is
|
||||
# open.
|
||||
updateTitle: ->
|
||||
if projectPath = atom.project.getPath()
|
||||
if projectPath = atom.project.getPaths()[0]
|
||||
if item = @getModel().getActivePaneItem()
|
||||
title = "#{item.getTitle?() ? 'untitled'} - #{projectPath}"
|
||||
@setTitle(title, item.getPath?())
|
||||
|
||||
Reference in New Issue
Block a user