T.83.0: remove 'mark-interrupt' command
There's no point having both 'interrupt' and 'mark-interrupt', as it only ever makes sense to use one or the other depending on the current timer state. Merge them into a single command (interrupt), and for compatibility bind both 'R' and 'r' to that command.
This commit is contained in:
parent
d9223f4603
commit
3560996263
4 changed files with 41 additions and 32 deletions
25
README
25
README
|
|
@ -1,10 +1,10 @@
|
||||||
RT/TTS - Time-tracking software
|
TTS - Time-tracking software
|
||||||
===============================
|
============================
|
||||||
|
|
||||||
RT/TTS is a simple, text-based (curses) time-tracking application. For more
|
TTS is a simple, text-based (curses) time-tracking application. For more
|
||||||
details, see the website at <http://loreley.flyingparchment.org.uk/~felicity/pages/tts>.
|
details, see the website at <http://loreley.flyingparchment.org.uk/~felicity/pages/tts>.
|
||||||
|
|
||||||
RT/TTS has been tested on FreeBSD, NetBSD, Solaris, Cygwin and Linux, with the
|
TTS has been tested on FreeBSD, NetBSD, Solaris, Cygwin and Linux, with the
|
||||||
following caveats:
|
following caveats:
|
||||||
|
|
||||||
- Wide character support does not work with Unicode using Solaris
|
- Wide character support does not work with Unicode using Solaris
|
||||||
|
|
@ -19,6 +19,21 @@ TTS uses autoconf and can be built as follows:
|
||||||
$ make
|
$ make
|
||||||
# make install
|
# make install
|
||||||
|
|
||||||
After starting with 'rttts', type '?' for help.
|
After starting with 'tts', type '?' for help.
|
||||||
|
|
||||||
|
### Quick start:
|
||||||
|
|
||||||
|
* Press 'a' to add a new entry, and enter its name. The timer starts running.
|
||||||
|
* Press space to toggle the timer on and off.
|
||||||
|
* Press 'A' to add an entry and have TTS prompt for its initial time.
|
||||||
|
* Press 'd' to delete an entry, and 'u' to undelete it.
|
||||||
|
* Press 'e' to edit an entry's description, or '\' to edit its time.
|
||||||
|
* Press '+' to add time to an entry or '-' to remove time.
|
||||||
|
* Press '?' for more help, and look at the sample .ttsrc.
|
||||||
|
* When you're working on something and something else comes up, press 'r' to
|
||||||
|
start the interrupt timer. When you're done with the other thing, press 'r'
|
||||||
|
again to assign the interrupt time to a new entry.
|
||||||
|
|
||||||
|
### Contact
|
||||||
|
|
||||||
Send questions/comments/bugs/patches to <felicity@loreley.flyingparchment.org.uk>.
|
Send questions/comments/bugs/patches to <felicity@loreley.flyingparchment.org.uk>.
|
||||||
|
|
|
||||||
18
configure
vendored
18
configure
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for RT/TTS T.82.0.
|
# Generated by GNU Autoconf 2.69 for RT/TTS T.83.0.
|
||||||
#
|
#
|
||||||
# Report bugs to <felicity@loreley.flyingparchment.org.uk>.
|
# Report bugs to <felicity@loreley.flyingparchment.org.uk>.
|
||||||
#
|
#
|
||||||
|
|
@ -580,8 +580,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='RT/TTS'
|
PACKAGE_NAME='RT/TTS'
|
||||||
PACKAGE_TARNAME='rt-tts'
|
PACKAGE_TARNAME='rt-tts'
|
||||||
PACKAGE_VERSION='T.82.0'
|
PACKAGE_VERSION='T.83.0'
|
||||||
PACKAGE_STRING='RT/TTS T.82.0'
|
PACKAGE_STRING='RT/TTS T.83.0'
|
||||||
PACKAGE_BUGREPORT='felicity@loreley.flyingparchment.org.uk'
|
PACKAGE_BUGREPORT='felicity@loreley.flyingparchment.org.uk'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
|
|
@ -1232,7 +1232,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures RT/TTS T.82.0 to adapt to many kinds of systems.
|
\`configure' configures RT/TTS T.83.0 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
|
@ -1293,7 +1293,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of RT/TTS T.82.0:";;
|
short | recursive ) echo "Configuration of RT/TTS T.83.0:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
|
@ -1380,7 +1380,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
RT/TTS configure T.82.0
|
RT/TTS configure T.83.0
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
|
@ -1749,7 +1749,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by RT/TTS $as_me T.82.0, which was
|
It was created by RT/TTS $as_me T.83.0, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
|
@ -4720,7 +4720,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by RT/TTS $as_me T.82.0, which was
|
This file was extended by RT/TTS $as_me T.83.0, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
|
@ -4782,7 +4782,7 @@ _ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
RT/TTS config.status T.82.0
|
RT/TTS config.status T.83.0
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
AC_PREREQ([2.69])
|
AC_PREREQ([2.69])
|
||||||
AC_INIT([RT/TTS], [T.82.0], [felicity@loreley.flyingparchment.org.uk])
|
AC_INIT([RT/TTS], [T.83.0], [felicity@loreley.flyingparchment.org.uk])
|
||||||
AC_CONFIG_SRCDIR([tts.c])
|
AC_CONFIG_SRCDIR([tts.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
|
|
||||||
28
tts.c
28
tts.c
|
|
@ -250,7 +250,6 @@ static void ksync(void);
|
||||||
static void kexec(void);
|
static void kexec(void);
|
||||||
static void kmerge(void);
|
static void kmerge(void);
|
||||||
static void kint(void);
|
static void kint(void);
|
||||||
static void kmarkint(void);
|
|
||||||
|
|
||||||
typedef struct function {
|
typedef struct function {
|
||||||
const WCHAR *fn_name;
|
const WCHAR *fn_name;
|
||||||
|
|
@ -283,7 +282,6 @@ static function_t funcs[] = {
|
||||||
{ WIDE("execute"), kexec, WIDE("execute a configuration command") },
|
{ WIDE("execute"), kexec, WIDE("execute a configuration command") },
|
||||||
{ WIDE("merge"), kmerge, WIDE("merge marked entries into current entry") },
|
{ WIDE("merge"), kmerge, WIDE("merge marked entries into current entry") },
|
||||||
{ WIDE("interrupt"), kint, WIDE("split current entry into new entry")},
|
{ WIDE("interrupt"), kint, WIDE("split current entry into new entry")},
|
||||||
{ WIDE("mark-interrupt"), kmarkint, WIDE("start interrupt timer for current entry")}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct tkey {
|
typedef struct tkey {
|
||||||
|
|
@ -679,7 +677,7 @@ char rcfile[PATH_MAX + 1];
|
||||||
bind_key(WIDE("<DOWN>"), WIDE("next"));
|
bind_key(WIDE("<DOWN>"), WIDE("next"));
|
||||||
bind_key(WIDE(":"), WIDE("execute"));
|
bind_key(WIDE(":"), WIDE("execute"));
|
||||||
bind_key(WIDE("M"), WIDE("merge"));
|
bind_key(WIDE("M"), WIDE("merge"));
|
||||||
bind_key(WIDE("r"), WIDE("mark-interrupt"));
|
bind_key(WIDE("r"), WIDE("interrupt"));
|
||||||
bind_key(WIDE("R"), WIDE("interrupt"));
|
bind_key(WIDE("R"), WIDE("interrupt"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1426,6 +1424,16 @@ time_t duration;
|
||||||
entry_t *en;
|
entry_t *en;
|
||||||
WCHAR *name;
|
WCHAR *name;
|
||||||
|
|
||||||
|
if (!itime) {
|
||||||
|
if (!running) {
|
||||||
|
drawstatus(WIDE("No running entry."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
itime = time(NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!running) {
|
if (!running) {
|
||||||
drawstatus(WIDE("No running entry."));
|
drawstatus(WIDE("No running entry."));
|
||||||
return;
|
return;
|
||||||
|
|
@ -1462,20 +1470,6 @@ WCHAR *name;
|
||||||
free(name);
|
free(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
kmarkint()
|
|
||||||
{
|
|
||||||
if (itime) {
|
|
||||||
kint();
|
|
||||||
} else {
|
|
||||||
if (!running) {
|
|
||||||
drawstatus(WIDE("No running entry."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
itime = time(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ksearch()
|
ksearch()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue