OS X: Handle power events sensibly.

Currently, if the computer goes to sleep and wakes up later, TTS will count
all the time spent asleep against the currently running entry (if any).  If
(like me) your computer being asleep means you aren't working, this probably
means you just forgot to stop the time, and now you need to somehow calculate
(or guess) how much time to subtract.

With this change, TTS will instead prompt on wake-up whether to remove the
time spent sleeping from the current entry.
This commit is contained in:
Felicity Tarnell 2014-03-05 14:17:54 +00:00
parent 6a76613798
commit 038fbfdd18
4 changed files with 870 additions and 12 deletions

View file

@ -1,5 +1,5 @@
AC_PREREQ([2.69])
AC_INIT([RT/TTS], [T.1.0-79], [felicity@loreley.flyingparchment.org.uk])
AC_INIT([RT/TTS], [T.1.0-80], [felicity@loreley.flyingparchment.org.uk])
AC_CONFIG_SRCDIR([tts.c])
AC_CONFIG_HEADERS([config.h])
@ -12,5 +12,11 @@ LIBS="$LIBS $CURSES_LIB"
AC_CHECK_FUNCS([use_default_colors])
LIBS="$oLIBS"
AC_CHECK_HEADERS([IOKit/pwr_mgt/IOPMLib.h])
oLDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework IOKit"
AC_CHECK_FUNCS([IORegisterForSystemPower], [], [LDFLAGS="$oLDFLAGS"])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT