| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When pressing escape or entering an empty command, we returned from
key_generic_cmd() without updating the screen. Fix this by creating a
cleanup section at the bottom of key_generic_cmd() and jump to that
section when the command prompt is cancelled.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds following vim-style commands to the command mode:
* write
* w
* quit
* q
* wq
Commands can be suffixed with a "!" to force execution.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This adds an edit option to change an appointment's start time without
changing its duration.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Add a parameter that specifies whether the duration should be updated
when updating the start time of an item.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This allows for setting an empty end time when editing an item,
converting it into a punctual appointment.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Now that we moved the online help code into a separate function, use
that to display the introduction help page when pressing the generic
help key binding.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Reintroduce help.c and move the online help code into a new function
display_help().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Add aliases and choose the right help topic if the user requests help on
a key binding or a key binding label.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
In addition to getting help on specific topics, users can type things
like ":help s" or ":help ^A" to get help on specific key bindings now.
Note that we do not add help texts for these keys here -- we will alias
key bindings to already existing topics in a follow-up patch.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Remove the old online help system and change the generic help key to do
the same thing as ":help".
This also removes some context-sensitive help. We should think about
re-adding support for this later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
This adds a very basic explanation of the new help command that can be
displayed using ":help intro". This introduction is also added as
default page so that users can simply type ":help" instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
This adds a "help" command to the list of available command mode
commands. You can currently type "help", followed by a topic like "add".
calcurse will then try to open a file named "add.txt" in the
documentation directory and display it in an external pager.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
This adds support for vim-style command mode. The command mode can be
entered with pressing ":" (by default, the key binding is configurable).
Currently, no command is supported. Support for various commands will be
added later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Use print_datediff() to print durations. This allows for using something
like "%(duration:%EH:%M)".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
Instead of passing a date and printing the date difference between that
date and the current date, pass an actual date difference. This allows
for using the function in other places, such as for printing item
durations.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Adds %(remaining) style formatting, with parameter substitution
for %d, %H, %M, %S with E and - variables.
Signed-off-by: William Pettersson <william.pettersson@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Adds the -l/--limit command line option. Limits the number of appointments
and/or ToDo items displayed.
Signed-off-by: William Pettersson <william.pettersson@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
* Remove space before punctuation.
* Use "TODO" instead of "ToDo".
* Strip some formats to make sure lines are <=80 characters wide.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
Allow for skipping the end date which means that a punctual appointment
will be created.
Implements FR#25.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Display appointments having the same starting date as ending date using
a specific format that hides the end time ("12:00" instead of "12:00 ->
12:00").
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Replace nested case differentiations by initializing every single
character for each flag separately and joining all characters
afterwards. This makes it much easier to extend the function later.
Note that the same approach is already used in display_item().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Use following macro instead of "sizeof(x) / sizeof(x[0])" everywhere:
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Fix a couple of whitespace and line breaks. Bail out early instead of
using nested if statements.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Exceptions do not contain a time field -- do not check time fields which
may be uninitialized.
Regression introduced in 9907069f442c56c90b67accb2d8fbd046dfce6db. This
fixes test/recur-*.sh.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This completes our switch to the Linux kernel coding style. Note that we
still use deeply nested constructs at some places which need to be fixed
up later.
Converted using the `Lindent` script from the Linux kernel code base,
along with some manual fixes.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bail out when reading dates such as "02/30/2013" from the appointments
file. These *could* be converted into valid dates but since we never
write invalid dates to that file, these indicate a user error.
Fixes following test cases:
* appointment-009.sh
* appointment-012.sh
* appointment-016.sh
* appointment-019.sh
* event-003.sh
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Split date/time validation into separate functions check_date() and
check_time(). These will be used to validate date/time information when
reading items from the appointments file.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
Regression introduced in a363cb9b9111aed22d105adb0e7a8e9caab9bbe3.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
From the Linux kernel coding guidelines:
Do not unnecessarily use braces where a single statement will do.
[...] This does not apply if one branch of a conditional statement
is a single statement. Use braces in both branches.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Bail out early if we are reading a character while being in a final
state.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Add the new item *before* deleting the old one and get rid of temporary
buffers for the item message and note.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
This is needed in "ui-todo.c" now.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
This unit belongs to the presentation layer -- rename the file
accordingly.
Also, rename calendar_*() to ui_calendar_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
* Move UI-related functions to "ui-todo.c".
* Rename UI-related functions to ui_todo_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
* Move UI-related functions to "ui-day.c".
* Rename UI-related functions to ui_day_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* Rename "interaction.c" to "ui-day.c" since it no longer contains
todo-related UI functions.
* Rename appointment/event-related UI functions to ui_day_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* Move todo-related UI functions from "interaction.c" to a new
compilation unit "ui-todo.c".
* Rename all todo-related UI functions to todo_ui_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Add 2013 to the copyright range for all source and documentation files.
Reported-by: Frederic Culot <frederic@culot.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows for canceling a key reassignment. We cannot use a static key
here since every key could potentially be used in a binding. Instead,
just cancel if we are trying to reassign a key that has already been
used for that action before.
Signed-off-by: Michael Smith <crazedpsyc@mail4us.net>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We effectively turned the addition of an appointment into a fall through
case by deleting the break statement during refactoring. Revert this
deletion to skip the second prompt.
Regression introduced in f2dca7de3e8b164a4b3af3d58dde2f6776bfbee6.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Skip whitespace after obtaining the list of exceptions instead of
skipping the next character unconditionally.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
See commit 217e66729a249a638863a9cc2ff93b8368cd6094 for details.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not update an appointment's duration if the user cancels the prompt
at day_edit_duration(). Note that day_edit_duration() does not touch the
buffer if the prompt was canceled or an invalid value was entered,
resulting in the buffer variable being uninitialized in these cases.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Instead of converting everything to upper case and then using strncmp(),
use strncasecmp() which does case-insensitive comparison out of the box.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|