Merge branch 'master' into config

This commit is contained in:
Nathan Sobo
2012-12-28 11:32:24 -06:00
18 changed files with 281 additions and 69 deletions

View File

@@ -63,3 +63,7 @@ class Git
checkoutHead: (path) ->
@repo.checkoutHead(@relativize(path))
getDiffStats: (path) ->
stats = @repo.getDiffStats(@relativize(path))
stats or {'added': 0, 'deleted': 0}

View File

@@ -52,20 +52,24 @@ class RootView extends View
panesViewState: @panes.children().view()?.serialize()
packageStates: @serializePackages()
handleEvents: ->
@on 'toggle-dev-tools', => atom.toggleDevTools()
@on 'focus', (e) =>
if @getActiveEditor()
@getActiveEditor().focus()
handleFocus: (e) ->
if @getActiveEditor()
@getActiveEditor().focus()
false
else
@setTitle(null)
focusableChild = this.find("[tabindex=-1]:visible:first")
if focusableChild.length
focusableChild.focus()
false
else
@setTitle(null)
focusableChild = this.find("[tabindex=-1]:visible:first")
if focusableChild.length
focusableChild.focus()
false
else
true
true
handleEvents: ->
@on 'toggle-dev-tools', => atom.toggleDevTools()
@on 'focus', (e) => @handleFocus(e)
$(window).on 'focus', (e) =>
@handleFocus(e) if document.activeElement is document.body
@on 'active-editor-path-change', (e, path) =>
@project.setPath(path) unless @project.getRootDirectory()