| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to iterate over the list of regular appointments and the list of
recurrent appointments in separate loops, thus leading to recurrent
appointments being printed first and regular appointments being printed
afterwards, regardless of their start and end times. Merge these loops
to coerce precedence of the start time.
There's still a fair bit of hackery in here - we will fix that later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
We passed the function arguments the wrong way round. This regression
was introduced in commit 77ef3fe76e4ce4c9a990e8a5904ad2d83420ca02.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the "current_time" check from the first if condition. As "greater
than" relations (">") have higher precedence than assignments ("=") in
C, this caused "real_app_time" to always be one or zero which definitely
isn't what we want here. Reading further down, it turns out that we
don't even need this comparison here, so we should be fine removing it.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
We probably broke this in 9fab24818a119aef08b9726f6c1cd31d5434ce34.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure the start time as well as the description of the notification
appointment are synced after editing it.
We use notify_check_next_app()'s force parameter to ensure that the
notification item is updated even if only the description was modified.
Reported-by: Andraž 'ruskie' Levstik <ruskie@codemages.net>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows to force notify_check_next_app() to update the notification
appointment, even if start times are equal (e.g. if the item description
was changed).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We kinda broke this in 6377582841118688aee13aff98c9216403582e45.
All hail strsep()!
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove colons from the "SUMMARY:" and "DURATION:" search patterns in
ical_read_event() to allow for additional parameters (such as language
parameters, cf. RFC 5545).
Reported-by: Andraž 'ruskie' Levstik <ruskie@codemages.net>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We forgot to call vars_init() when importing an item using the "-i"
command line argument, which led to the pager configuration variable
being unset and hence the pager invocation (triggered to show the log in
case there are any errors during import) failing.
Fix this by calling vars_init() before io_import_data().
Reported-by: Andraž 'ruskie' Levstik <ruskie@codemages.net>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make use of the plural features of gettext to handle plural forms
correctly instead of using the plural form even if the singular form
should be used.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use separate format strings for separate values. This is useful in case
we want to output similar stats somewhere else and is a preparation for
supporting plural forms.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add new note_edit() and note_view() helper functions. Use these
instead of copy-pasted code in *_note_edit().
* Move all note-related functions (note_edit(), note_view(),
note_erase()) to a new source file "note.c".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Include the name of the configuration variable that issued the error in
error messages that are thrown while parsing the configuration file.
This makes it a lot easier to locate syntactic and semantic errors.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a map instead of dozens of hardcoded conditionals. This makes
configuration variable parsing more dynamic and extensible.
Also, reintroduce formatting error messages that we dropped earlier.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Also, temporarily remove all error messages and return an error status
instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
Removes the need to pass the terminal's default background color round.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Introduce conf_parse_unsigned() and conf_parse_int() similar to
conf_parse_bool().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Increase size argument for strncmp() comparisons by one to include the
terminating null-character (otherwise "yesfoo" would be parsed as
"yes", "nobar" as "no").
* Pass destination address as an additional argument and return
success/failure status to allow for better error handling.
* Temporarily remove error handling (will be fixed later).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
This is a much better name as it implicitly describes that this function
parses boolean configuration values only.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move configuration variable assignments to a new function,
custom_set_conf(). This improves code readability and allows for setting
configuration variables outside the configuration file loading function.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Include a fallback branch that accepts multi-line comments as well
(backward compatibility).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Throw an error message if there is a line that contains an invalid
configuration line (e.g. a non-empty line that neither contains a key
nor a value).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We actually only use this function to parse configuration data.
Currently, this probably is the best way to do some common
preprocessing.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Read key and value of each configuration setting in one loop cycle to
facilitate adjustments of the configuration setting format. Also, this
allows us to get rid of all the redundant variable resetting.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
We don't need to refresh windows every time an unassigned key is
pressed. Add a condition to skip the refresh part if that is the case.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't contribute to functionality or usability in any way. Keep
the progress bar option but only show bars as long as the actual save
operation is in progress.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace all hardcoded paths referring to "/tmp" with a new function that
honors the "TMPDIR" environment variable as well as P_tmpdir and uses
"/tmp" as a fallback.
Thanks-to: Erik Saule <esaule@bmi.osu.edu>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
This removes the need of reading the whole data file and find matching
entries if we want to parse appointments in external programs.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Pipe a serialized todo item to an external process, similar to what
day_pipe_item() does (cf. c3f532d814e555abf67efb136491956428f19965).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Serializes an appointment or an event, prompts for a shell command and
executes that command in a new process, piping serialized item data to
its stdin.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Displays "Press any key to continue..." in shell terminal mode and waits
for a key stroke.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Invoke endwin() *after* calling any other curses functions, such as
refresh(). Calling refresh() after endwin() might restore curses mode
which is a bad thing for a terminal mode initialization routine.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Do window preparation and restoring in separate functions
wins_prepare_external() and wins_unprepare_external().
* Use fork_exec() and child_wait() instead of system().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
Can be used to execute an external program in a shell.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
Can be used to wait for the termination of a child process.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Can be used to execute an external program. Provides the possibility to
optionally create a pipe to the new process.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
This allows one to serialize and send recurrent items to arbitrary
output streams.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add a todo_write() function that allows one to serialize todo items and
write serialized data to an output stream in a fashion similar to
apoint_write() and event_write().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Sort character width lookup table by character ranges.
* Use binary search instead of linear search for UTF-8 character width
lookups which will speed up utf8_width() (O(log n) instead of O(n)).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid a segfault that may occur if getstr_fixscr() changes the scroll
offset to something outside the input boundaries (e.g. if a word that is
only partly visible is killed via backward-kill-word).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|