adobe/brackets — pull request #1107 by gruehle (2012-06-22 03:30:10+00:00)
Title: Add fail handler to close and quit command handlers

This is only needed for the new shell, but is harmless in the old shell.

The new shell is asynchronous, so we can't depend on synchronously closing all windows when quitting. In order to abort the quit operation if the user selects "Cancel" in a save prompt, we now send and abortQuit() message back to the shell application.

These depend on a new app shell function - abortQuit(). For compatibility with the old shell there is code that checks for this function before calling it. There is a TODO to remove the check once we've migrated to the new shell.