Jérôme Laheurte wrote:

> 
> 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).

1. I hate it when the system does not shutdown when I tell it to do
because some dumb app asks me if I want to save or something. (I usually
press the Off button and walk away), so I agree with suggestions 1)+ 2)

2. I am usually finished with the current time tracked task when I
shutdown, so I would like Task Coach to automatically set the stop time
of the task in this case, save everything else and then close.

> 
> 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 ?
> 
I had problems with an older version of wxWindows with the
EVT_QUERY_END_SESSION message even on Windows. Does it work now?


cheers
Hans

Reply via email to