When the session terminates (log off, reboot, shutdown) while Task Coach is running, the app exits without the frame having been notified that it's closing. This can obviously lead to data loss (think of a laptop automatically shutting down because of low power) but it has also other consequences: the last opened file is not remembered, the task file is still locked, probably some others.
There seems to be a notification system (EVT_QUERY_END_SESSION) that we use precisely to avoid blocking the shutdown process with a dialog box, so I guess the potential data loss has been considered a lesser evil. Unfortunately, this mechanism works only under Windows (I didn't try MacOS but it sure doesn't work under Linux with the latest wx). So at first I think we should 1) Handle the case under Win32 by releasing the lock when the system shuts down 2) Make the "don't prompt if there are modifications when closing" an option, off by default, because I think most people are in front of their computer when they shut it down and don't want to lose data 3) Somehow work around the wx limitation in order to do 1) on Linux and MacOS too. This will probably involve platform-specific code using ctypes and maybe pyobjc, I'll try to dig this this week-end. What do you think ? Cheers Jérôme
