Don't close app when closing last window

Is there a way to set up Komodo Edit so that it doesn’t close the application when the last window closes? It is annoying to have to wait for the app to open when I use it to edit files downloaded from Filezilla.

No, you need to keep at least one Komodo window open. There is no “minimize to tray” option or anything like that.

@newheart42108 you can set up a userscript to ask if you want to close a komodo window

Just create a userscript:

var r = confirm("Close komodo window?");
if (r !== true) {
    return true;
}

And under the tab triggers, select “on shutdown”.
Now komodo will ask if you want to close a window before closing the komodo window

@nathanr how do you prevent shutdown in a userscript without the trigger and to witch event do you have listen to?

Untested, but this is basically what you’d need to do:

var handler = {};
var observerSvc = Components.classes["@mozilla.org/observer-service;1"].
                getService(Components.interfaces.nsIObserverService);
observerSvc.addObserver(handler, "quit-application-requested", false);

handler.observe = function(event) {
    event.data = true; // cancel shutdown
};

Thanks @nathanr it works :thumbsup:

@newheart42108 because i think the to “minimize to tray” is a nice feature to have( when having multiple komodo windows open, sometimes I’m to fanatically when closing the other windows ), I’ve created a addon where you can configure the closing behavior of Komodo.
You can setup komodo to prompt before closing the last Komodo window, or choose for the “minimize to tray” option or choose for the default behavior.
I also added a Shutdown Komodo option in the close menu so you can break out of the “minimize to tray” behavior.
You can download the first beta release from here, and find the full info in the readme here.