Commit Graph
100 Commits
Author SHA1 Message Date
Lukas Fleischer ea9a98ca5d Upgrade configure.ac
Update outdated configure.ac by running autoupdate, followed by some
minor manual changes.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-14 23:02:25 -04:00
Lukas Fleischer 1c5eb9f962 Skip AsciiDoc checks if --disable-docs is used
Fixes GitHub issue #451.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-14 22:53:52 -04:00
Lukas Fleischer 213e5f86a5 Update copyright ranges for 2023
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 17:04:24 -04:00
Lukas Fleischer 98ff4dbacb Fix Mac OS GitHub workflow
Prior to this change, CI was failing with the following error:

    ==> Installing asciidoc dependency: python@3.11
    ==> Pouring python@3.11--3.11.3.monterey.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/2to3
    Target /usr/local/bin/2to3
    already exists. You may want to remove it:
      rm '/usr/local/bin/2to3'

    To force the link and overwrite all conflicting files:
      brew link --overwrite python@3.11

    To list all files that would be deleted:
      brew link --overwrite --dry-run python@3.11

Explicitly link with overwrite.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 15:55:39 -04:00
Lukas Fleischer ac5113640d Fix handling of recurrent open-ended appointments at 00:00
Prior to this commit, a recurrent appointment ending at 00:00 on a given
day was not considered to span the day. This is the correct behavior for
all cases, except appointments without end time (both starting and
ending at midnight on a given day). Handle this edge case explicitly.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-01-01 11:47:49 -05:00
Lukas Fleischer ce6f8bf85b Extend default description to all item types
Show default description "(empty description)" for all types of items
(appointments, events, recurring appointments/events, TODOs).

Follow-up to 7b350ac (Add text for displaying empty event description,
2022-06-21).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-12-25 16:36:27 -05:00
Lukas Fleischer 77ffe5d627 Release 4.8.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-16 18:31:14 -04:00
Lukas Fleischer 9fdf42c15f Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-16 18:31:14 -04:00
Lukas Fleischer 0ccd68bec6 calcurse-caldav: fix InsecureSSL
Pass disable_ssl_certificate_validation as keyword argument to
httplib2.Http().

Fixes a regression introduced in 1e1d615 (Refactor calcurse-caldav to
use httplib2, 2017-09-06).

Fixes GitHub issue #420.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-16 17:49:19 -04:00
Lukas Fleischer 01ad848628 Update copyright ranges for 2022
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:33:19 -05:00
Lukas Fleischer a03a4710cc Fix compiler warning in SHA1 implementation
Update the signature of sha1_final() to fix the following warning:

    sha1.c:208:43: warning: argument 2 of type ‘uint8_t[20]’ {aka
    ‘unsigned char[20]’} with mismatched bound [-Warray-parameter=]

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:29:51 -05:00
Lukas Fleischer 20b23cc32e Fix SHA1 calculation on big-endian systems
Add the AC_C_BIGENDIAN macro to determine endianness and set
WORDS_BIGENDIAN accordingly.

Fixes GitHub issue #397.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:23:47 -05:00
Lukas Fleischer 6e6663c5dd Release 4.7.1
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-10 16:50:32 -04:00
Lukas Fleischer 3d0cc429d9 po/: translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-10 09:14:10 -04:00
Lukas Fleischer 5398f3a24e Call setsid() for hook/notification commands
We do not want hook or notification commands to interact with the
terminal in any way. Create a new session for them.

Addresses GitHub issue #326.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:31 -04:00
Lukas Fleischer 193ad3415a Redirect standard descriptors for hook/notify commands
Disconnect stdin, stdout and stderr when running an external hook or
notification command. The previous solution of appending "<&- >&- 2>&-"
to the shell command line does not work if the command includes pipes.

Use shell_exec() in notify_launch_cmd() instead of a custom (and
incomplete) reimplementation of that command.

Partially addresses GitHub issue #326.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:31 -04:00
Lukas Fleischer 5710a8bd7f Add parameter to redirect stderr to shell_exec()
Add a function parameter to allows redirecting stderr in addition to
stdin and stdout. The parameter will be used with a follow-up change.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:26 -04:00
Lukas Fleischer f41955e491 calcurse-caldav: document Hostname and Path better
Add some clarification on the expected format for the Hostname and Path
options in the sample configuration file.

Addresses GitHub issues #95, #138, and #354.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer be5cf3578d README.md: add build badges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer 81c26f8fd5 Add GitHub Actions workflow lint_python
Run codespell, flake8, and isort for each change to one of the scripts
in contrib/.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer 3e8bba2fd1 Replace Travis CI with GitHub Actions configuration
Replace the Travis CI configuration with an equivalent GitHub Actions
workflow.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer b36e603997 Do not use readlink(1) in tests
Avoid using readlink(1) which is not POSIX-compatible; moreover,
`readlink -f` is not available on Mac OS by default.

Instead, always convert $CALCURSE to an absolute path (that may or may
not be canonical, i.e., be a symlink or contain ../ as component) in
test-init.sh by prepending the current working directory if the original
path is relative. While not fully equivalent to `readlink -f`, this
should be good enough for use in our tests.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 17:55:46 -04:00
Lukas Fleischer f1e84bd18b Fix flake8 and isort warnings
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 17:55:46 -04:00
Lukas Fleischer 594bd62378 calcurse-caldav: improve config file error handling
The previous implementation allowed sections and keys other than those
used by the script which led to a variety of bug reports due to typos in
the configuration. Disallow entries other than those explicitly used and
make both section and key names case-sensitive (previously, only section
names where case-sensitive).

Check that Hostname and Path are set before using them.

Addresses GitHub issues #327 and #350.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 17:55:08 -04:00
Lukas Fleischer e1b5580bdf Avoid double free on iCal import errors
Set pointers to NULL after calling free() to prevent double free on
cleanup.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-11-07 19:53:21 -05:00
Lukas Fleischer 1e243dba90 Fix parallelized test runs
Do not share a common temporary directory between different test cases.

Reported-by: Tomasz Kłoczko <kloczko.tomasz@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-13 20:43:37 -04:00
Lukas Fleischer d960391bd5 Release 4.7.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-12 11:16:08 -04:00
Lukas Fleischer 06ce86c600 test: indent continuation lines
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-12 11:16:08 -04:00
Lukas Fleischer 701f8e4fbd test: fix recur-010.sh
Use mktemp(1) to create temporary directory. Copy missing todo file. Do
not modify any files in tests. Simplify and make some commands more
robust. Indent continuation lines.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-12 11:15:48 -04:00
Lukas Fleischer c1b3807cb0 Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-12 11:04:10 -04:00
Lukas Fleischer d25b9c0f37 Use dynamically allocated string in struct io_file
Avoid using fixed-size buffers and strncpy().

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-11 09:59:37 -04:00
Lukas Fleischer 1b40844aa3 Fix memory leak in run_hook()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-11 09:59:37 -04:00
Lukas Fleischer 47fb9b740f Redesign the item deletion menu
Instead of the previous inconsistent and potentially nested menus, the
following message is now displayed when deleting an item:

    Delete (s)elected occurrence, (a)ll occurrences, or only the (n)ote?

Options that are not available (e.g. because the item is not recurrent
or does not have a note) are omitted. For a non-recurrent item without a
note the message becomes

    Delete (s)elected occurrence?

and is skipped if general.confirmdelete is disabled.

Implements GitHub feature request #308.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-10-11 09:59:37 -04:00
Lukas Fleischer 41e1a89aa7 Add Lars to AUTHORS
Thanks for all the work, Lars!

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-07-19 08:19:55 -04:00
Lukas Fleischer 5a3664bf73 Release 4.6.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-03-27 18:59:20 -04:00
Lukas Fleischer 5e571c72d8 po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-03-27 18:59:20 -04:00
Lukas Fleischer 5ad76df5fe Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-01-30 19:22:23 +01:00
Lukas Fleischer f4e621d58d Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-01-30 19:14:56 +01:00
Lukas Fleischer 9befae484d .gitignore: add test/*.{log,trs}
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-12-23 13:16:39 -05:00
Lukas Fleischer 41143c5a83 calcurse-caldav: Document configuration for Yahoo
Suggested-by: Tony Barganski <tonybarganski@outlook.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-11-09 12:49:32 -05:00
Lukas Fleischer f49ec4ad6e Allow discarding a todo item from the priority prompt
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-11-03 10:56:47 -05:00
Lukas Fleischer 35eaa4a737 Release 4.5.1
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-10-18 17:18:01 -04:00
Lukas Fleischer 1b43893c4c test/Makefile.am: Add apts-dst to EXTRA_DIST
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-10-18 17:18:01 -04:00
Lukas Fleischer 65e2a71b76 Release 4.5.0
Helped-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-17 08:42:03 -04:00
Lukas Fleischer 130221dd0e po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-16 15:29:05 -04:00
Lukas Fleischer 3216814be1 Use current value as default for periodic save
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-07 21:06:18 -04:00
Lukas Fleischer 4fb5eb4ce3 Disable view item/note bindings for dummy items
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-06 22:38:46 -04:00
Lukas Fleischer d659a8e2ee Use empty end date instead of 0 when editing repetitions
Since commit 987fa9d (Allow to omit end date in repetitions,
2019-06-03), one can provide an empty date instead of using the value 0
to omit the end date of a repetition. Use this as default value when
editing repetitions without an end date.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-06 20:57:48 -04:00
Lukas Fleischer 16b346a1f4 Add GitHub gimmicks
Add a bug report template and a sponsor button to the GitHub interface.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-06 20:57:48 -04:00
Lukas Fleischer 987fa9d3e5 Allow to omit end date in repetitions
Addresses GitHub issue #213.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-03 18:43:42 -04:00
Lukas Fleischer 2f348a9292 README.md: move demo to top of document
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-31 20:35:49 -04:00
Lukas Fleischer d280a5a55a Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-30 07:53:14 -04:00
Lukas Fleischer 31b02513aa calcurse-caldav: replace readfp() by read_file()
Addresses GitHub issue #209.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-26 10:04:28 -04:00
Lukas Fleischer 90b91d92db Fix note on -P in the 4.4.0 release notes
Reported-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-24 12:50:11 +01:00
Lukas Fleischer e72d984906 Release 4.4.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-21 07:50:08 +01:00
Lukas Fleischer 61ca7cf864 Update po files
This is just automated updates from `make update-po` and does not
include any new translations from Transifex.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-21 07:20:24 +01:00
Lukas Fleischer 6cd67311e3 Check for KEY_ENTER in getstring()
In some cases (e.g., TERM=pccon0) wgetch(3) can return KEY_ENTER instead
of '\n' when the return key is pressed, causing getstring() to fail.

Suggested-by: Mikolaj Kucharski <mikolaj@kucharski.name>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-10 21:40:11 +01:00
Lukas Fleischer 0bbe802002 Use portable default day heading format
The %-d format string is not standards-compliant. Use %e instead.

Reported-by: Mikolaj Kucharski <mikolaj@kucharski.name>
Suggested-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-10 21:36:39 +01:00
Lukas Fleischer 1f74ad3357 calcurse-caldav: fix -x argument
The optional argument to -x must be given as "-xical" (without a space).

Partly addresses GitHub issue #177.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-10 21:33:35 +01:00
Lukas Fleischer 5657e19e17 Invalidate calendar cache when adding an exception
Removing an occurrence of a recurrent item can turn a busy day into a
free day.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-02 18:21:08 +01:00
Lukas Fleischer 4eda8f6937 calcurse-caldav: drop misplaced filter argument
We cannot use the filter options when importing events.

This was noticed because the new calcurse argument parser catches
invalid input flag combinations and bails out.

Partly addresses GitHub issue #177.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-02 18:13:49 +01:00
Lukas Fleischer 0169ba0934 doc/flag.txt: fix typo
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-01-24 08:23:22 +01:00
Lukas Fleischer b0984e71b0 Refactor keys_format_label()
Simplify the key formatting function and enforce display width properly
using the UTF8 chopping function.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-01-19 15:07:42 +01:00
Lukas Fleischer bffa517250 Bind RETURN to view-item by default
Also, use the modern key name instead of the backwards compatibility
name.

Addresses GitHub issue #168.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-01-19 10:41:05 +01:00
Lukas Fleischer 03340db72e Use time_t for system time values
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-01-14 06:21:34 +01:00
Lukas Fleischer 51f17fb9c6 Update message catalog 2019-01-12 18:09:58 +01:00
Lukas Fleischer e3ca60eefe Fix default paths for configuration files
Addresses a copy-paste typo introduced in commit 65064ce (Check if the
configuration folder exists, 2018-08-25).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-11-10 12:34:47 +01:00
Lukas Fleischer efdff01da8 Ignore resize and error keys in getstring()
Partly addresses GitHub issue #145.

Suggested-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-10-21 20:04:38 +02:00
Lukas Fleischer 37d8725e78 contrib/caldav/Makefile.am: add config.sample
Fixes GitHub issue #144.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-10-21 20:01:34 +02:00
Lukas Fleischer c4960aaf93 calcurse-caldav: fix auth method check
Fixes a regression introduced in 6a6c711 (calcurse-caldav: fix basic
authentication, 2018-07-20).

Addresses GitHub issue #149.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-09-27 07:33:47 +02:00
Lukas Fleischer ea0a33645a README.md: add demo
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-30 07:25:25 +02:00
Lukas Fleischer 9f8622905c Update README.md
* Add more details on the project directory structure.
* Add information on contributions and donations.
* Move contributors to the manual but keep a reference.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-30 07:25:25 +02:00
Lukas Fleischer 5efc334c1b Fix memory leak in run_hook()
Fixes GitHub issue #139.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:22:29 +02:00
Lukas Fleischer a5febe2e22 Make editing of punctual appointments more intuitive
When editing the start time, move the item instead of keeping the
previous start time as end time. When editing the end time, start with
an empty end time instead of the previous start time.

Fixes GitHub issue #89.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 09:28:56 +02:00
Lukas Fleischer 8466717f06 calcurse-caldav: print executed commands in debug mode
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 08:54:03 +02:00
Lukas Fleischer 41f4a92fa9 Only stop threads when exiting from interactive mode
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 08:47:18 +02:00
Lukas Fleischer dd4d444c0c calcurse-caldav: print HTTP status codes in debug mode
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-21 05:51:35 +02:00
Lukas Fleischer 30f411257a Do not stop already cancelled notification thread
Add a static state variable to indicate whether the notification thread
is already running or not. Only start the thread if the notification
thread is paused. Only stop the thread if the notification thread is
actually running.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-06-03 10:28:28 +02:00
Lukas Fleischer e55aead126 Only lock save mutex as short as possible
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-06-03 10:28:28 +02:00
Lukas Fleischer 574156be7c Always NUL-terminate buffer in note_gc()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 12:05:50 +02:00
Lukas Fleischer 68cac7345c Always NUL-terminate buffer in keys_fill_missing()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 12:05:41 +02:00
Lukas Fleischer 7efe03cf05 Fix buffer overflow in keys_action_allkeys()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 12:03:03 +02:00
Lukas Fleischer 2cd60c78cf Always NUL-terminate buffer in io_load_keys()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 11:52:41 +02:00
Lukas Fleischer 65c2b6d9b8 notify.c: fix several buffer overflows
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 11:51:38 +02:00
Lukas Fleischer 8abb1a93ad Properly NUL-terminate the day heading after editing
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 11:47:01 +02:00
Lukas Fleischer 7e5f8ed7bc Avoid buffer overrun in config_parse_str()
The previous implementation only read a prefix from the configuration
file if the configuration value was too long and forgot to terminate the
string with a NUL character.

Return 0 if the string is too long instead.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 11:44:30 +02:00
Lukas Fleischer fda8c1a7e2 calcurse-caldav: remove authorization data from logs
The Authorization header contains the Base64-encoded user name and
password. Remove this information from debug logs, unless the user
explicitly requests to keep them by using the --debug-raw flag.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-23 17:59:50 +02:00
Lukas Fleischer 912124bcdc Run pre-load hook before testing for modifications
The pre-load hook is often used to manipulate the data files before
loading, such as by synchronizing with a remote calendar. Make sure we
always execute the pre-load hook upon reloads, even if the data files
have not been modified.

Fixes GitHub issue #98.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-23 17:52:05 +02:00
Lukas Fleischer 2d19605ba8 Unlock the save mutex as early as possible
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-19 10:34:19 +02:00
Lukas Fleischer 1418e40793 Use dummy variables to ignore return values of pair_content()
This prevents from segmentation faults with recent ncurses
implementations. See commit 5722d2e (Fix segmentation fault when
changing colors, 2017-07-28) for details.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-10 14:05:43 +02:00
Lukas Fleischer b82a3b9276 Allow for passing negative arguments to -d
When specifying date ranges using -d, allow for passing negative values
to indicate that the date range should start a certain number of days
ago.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-12-13 09:06:32 +01:00
Lukas Fleischer edc44d613b calcurse-caldav: Avoid corrupting the sync DB
When importing an iCal event via calcurse fails (i.e. does not return a
single object hash), do not write anything to the synchronization
database instead of blindly appending the entry, thereby potentially
corrupting the database.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-23 08:57:45 +01:00
Lukas Fleischer 16e7aecd29 Do not prompt when non-interactive import fails
When running calcurse in non-interactive mode, we should not expect any
user input. This is even more important in the case of iCal imports
which are used by calcurse-caldav to import events from CalDAV servers.

Partly fixes GitHub issue #73.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-23 08:57:45 +01:00
Lukas Fleischer 5b94be2246 Revert "calcurse-caldav: Add --password command line argument"
This reverts commit efd76a0d99.

Passing passwords as command line arguments is not a good idea, since
they may appear in process listings which are potentially visible to
other users logged into the system.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-08 21:54:53 +01:00
Lukas Fleischer 8b92fde3a3 Release 4.3.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-02 08:42:52 +01:00
Lukas Fleischer 2fc161f4d2 po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-02 08:42:52 +01:00
Lukas Fleischer 4dbb00c595 test/Makefile.am: Add missing data file to EXTRA_DIST
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-11-02 08:37:47 +01:00
Lukas Fleischer bf6ca4405a .travis.yml: Test under both Linux and OS X
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-10-29 08:42:03 +01:00
Lukas Fleischer e9bddf38e8 Parse time before date in parse_datetime()
Make sure that in cases when the date and time formats conflict, such as
is the case with "0030", the input is interpreted as a time value, not a
date.

Suggested-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-10-27 08:40:10 +02:00
Lukas Fleischer 301f240881 Make parsing of date-time more strict
In parse_datetime() it was possible to enter any number of dates and
times in any order. Allow just date or time or date followed by time.

Time must be looked for before date because of conflicting time and date
formats.

Suggested-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-10-26 20:49:30 +02:00