Add 'pane:close' event, which destroys all pane items.

Still have some issues with the presentation order of dialogs with
multiple unsaved buffers and no paths. But for the 99% case this works
as is.
This commit is contained in:
Nathan Sobo
2013-03-01 14:37:46 -07:00
committed by probablycorey
parent da986b6a6c
commit 48c693d756
2 changed files with 13 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ class Pane extends View
@command 'pane:split-right', => @splitRight()
@command 'pane:split-up', => @splitUp()
@command 'pane:split-down', => @splitDown()
@command 'pane:close', => @destroyItems()
@on 'focus', => @activeView.focus(); false
@on 'focusin', => @makeActive()
@@ -108,6 +109,9 @@ class Pane extends View
else
reallyDestroyItem()
destroyItems: ->
@destroyItem(item) for item in @getItems()
promptToSaveItem: (item, nextAction) ->
path = item.getPath()
atom.confirm(