Comparar commits

...

3 Commits

Autor SHA1 Mensagem Data
Daniel Hengeveld 624dda977a Fix mismatched setting name 2014-07-15 15:39:56 -07:00
Daniel Hengeveld 9aa42f21c1 dedent properly 2014-07-15 15:31:53 -07:00
Daniel Hengeveld 0d5bf57862 Close window after last pane by default. 2014-07-15 15:21:03 -07:00
2 arquivos alterados com 24 adições e 1 exclusões
+14
Ver Arquivo
@@ -287,6 +287,20 @@ describe "WorkspaceView", ->
expect(atom.workspaceView.getActivePaneView().getItems()).toHaveLength 0
expect(atom.workspaceView.getPaneViews()).toHaveLength 1
it "closes the window after the last pane is closed if closeWindowAfterLastItem is true", ->
atom.config.set('core.closeWindowAfterLastItem', true)
atom.workspaceView.trigger('core:close')
spyOn(atom, 'close')
expect(atom.close).toHaveBeenCalled()
it "does not close the window after the last pane if closeWindowAfterLastItem is untrue", ->
atom.config.set('core.closeWindowAfterLastItem', false)
atom.workspaceView.trigger('core:close')
spyOn(atom, 'close')
expect(atom.close).not.toHaveBeenCalled()
describe "the scrollbar visibility class", ->
it "has a class based on the style of the scrollbar", ->
scrollbarStyle = require 'scrollbar-style'
+10 -1
Ver Arquivo
@@ -72,6 +72,7 @@ class WorkspaceView extends View
audioBeep: true
destroyEmptyPanes: true
useReactEditor: false
closeWindowAfterLastItem: true
@content: ->
@div class: 'workspace', tabindex: -1, =>
@@ -154,7 +155,15 @@ class WorkspaceView extends View
@command 'pane:reopen-closed-item', => @getModel().reopenItem()
@command 'core:close', => if @getModel().getActivePaneItem()? then @destroyActivePaneItem() else @destroyActivePane()
@command 'core:close', =>
if @getModel().getActivePaneItem()?
@destroyActivePaneItem()
else
@destroyActivePane()
if atom.config.get('core.closeWindowAfterLastItem') and not @getModel().getActivePaneItem()
atom.close()
@command 'core:save', => @saveActivePaneItem()
@command 'core:save-as', => @saveActivePaneItemAs()