Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

JS changes to prompt user when a native quit, window close, or reload occurs. #215

Merged
merged 21 commits into from
Feb 8, 2012

Conversation

tvoliter
Copy link
Contributor

@tvoliter tvoliter commented Feb 7, 2012

This should be merged with pull request #55 on the brackets-app repo

Changes

  • Added new module shellAPI to allow native calls from the shell to JS
  • Changes to make sure unsaved changes are complete before quitting/closing window
  • Prompt to save when browser reloads

function handleFileQuit(commandData) {
var deferred = _handleCloseWindowCommon(commandData);
deferred.done(function quitApp() {
brackets.app.Quit();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function should use a lower-case 'q' (quit instead of Quit)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -58,7 +62,7 @@ define(function (require, exports, module) {
CommandManager : require("CommandManager")
};

brackets.inBrowser = !brackets.hasOwnProperty("fs");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to delete this line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That got dropped in a merge from master. I added it back.

gruehle added a commit that referenced this pull request Feb 8, 2012
JS changes to prompt user when a native quit, window close, or reload occurs.
@gruehle gruehle merged commit f69fbfa into master Feb 8, 2012
iwehrman pushed a commit to iwehrman/brackets that referenced this pull request Sep 11, 2013
Request up to 100 available themes from Kuler
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants