aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve man page readabilityNitroretro2019-12-291-24/+19
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test for the directory structureNitroretro2019-12-237-0/+74
| | | | | | | | Ensure that calcurse uses the right data and configuration directories depending on the conditions. Helped-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Use $XDG_{CONFIG,DATA}_HOME in hooksNitroretro2019-12-233-19/+51
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-upgrade: use $XDG_CONFIG_HOMENitroretro2019-12-231-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-vdirsyncer: use $XDG_DATA_HOMENitroretro2019-12-231-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: use $XDG_{CONFIG,DATA}_HOMENitroretro2019-12-231-5/+15
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Change documentation to reflect the new file structureNitroretro2019-12-2311-70/+109
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add XDG Base Directory SupportNitroretro2019-12-232-9/+37
| | | | | | | | | | | * Use "$XDG_DATA_HOME/calcurse" for data files * Use "$XDG_CONFIG_HOME/calcurse" for config files * "$XDG_DATA_HOME" defaults to "$HOME/.local/share" * "$XDG_CONFIG_HOME" defaults to "$HOME/.config" * If "$HOME/.calcurse" exists, then it will be used instead for backward compatibility. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Make io_check_dir() create parent directoriesNitroretro2019-12-231-5/+27
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix next recurrent appointment deletedLars Henriksen2019-12-231-1/+10
| | | | | | | | | | | If the notify bar displays a recurrent appointment after midnight as next upcoming appointment, the bar is not updated when the appointment/occurrence is deleted. The problem is not seen in 4.3.0 because of the bug described in commit 8cbd456, Fix next recurring appointment. The problem and the solution is the same, this time in the function notify_same_recur_item(). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix empty string in updatestring()Lars Henriksen2019-12-231-3/+9
| | | | | | | | If the update results in an empty string (return value GETSTRING_RET), the original string remains whereas it should be empty. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* .gitignore: add test/*.{log,trs}Lukas Fleischer2019-12-231-0/+2
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Document configuration for YahooLukas Fleischer2019-11-091-3/+26
| | | | | Suggested-by: Tony Barganski <tonybarganski@outlook.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Make the text for empty days configurableLars Henriksen2019-11-035-1/+27
| | | | | | | The default is "--"; a single space makes the text invisible. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Allow discarding a todo item from the priority promptLukas Fleischer2019-11-031-2/+4
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Support RET to set the todo item priority to 0Issam Maghni2019-11-031-4/+7
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix save of interactively imported dataLars Henriksen2019-11-031-0/+4
| | | | | | Adresses Github issue #249. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: handle objects with status code 404Si Yong Kim2019-11-031-0/+10
| | | | | | | | | Display a warning if any of the events reported by the server cannot be found instead of bailing out. Addresses GitHub issue #137 and #245. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Release 4.5.1v4.5.1Lukas Fleischer2019-10-183-2/+16
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* test/Makefile.am: Add apts-dst to EXTRA_DISTLukas Fleischer2019-10-181-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test for DST and recurrent itemsLars Henriksen2019-10-183-1/+317
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* DST and recurrent itemsLars Henriksen2019-10-181-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adresses two issues with the function recur_item_find ocurrence(), one major: mktime(), and one minor: item duration. In addition, some refactoring is done. The following recurrent appointments demonstrate the problems (as described in the message) and are used as test cases in the associated test commit. 03/29/2019 @ 12:00 -> 03/30/2019 @ 11:00 {2D -> 04/03/2019} |two-day - every other day - not on 1/4 03/31/2019 @ 12:00 -> 03/31/2019 @ 13:00 {1D -> 04/01/2019} |daily - not on 31/3, twice on 1/4 03/31/2019 @ 04:00 -> 03/31/2019 @ 05:00 {1W} |weekly - appears after one week 03/31/2019 @ 12:00 -> 03/31/2019 @ 12:00 {1M} |monthly - never appears 03/31/2019 @ 12:00 -> 03/31/2019 @ 12:00 {1Y} |yearly - never appears 10/20/2019 @ 00:00 -> 10/21/2019 @ 01:00 {1W -> 11/03/2019} |25 hours - ends on 27th, but continues on 28th 03/24/2019 @ 00:00 -> 03/25/2019 @ 00:00 {1W -> 04/07/2019} |24 hours - does not continue on April 1 The root cause is two mktime() calls in recur_item_find_occurrence(), both of which use an inherited tm_isdst value in the tm structure. In such cases mktime() will "normalize" the tm stucture if tm_isdst is 0 or 1 and in disagreement with the rest of the tm contents (just like 32 May will be normalized to 1 June). Example. In 2019 DST started on 31/3 at 02:00:00 (in the European Union). If the (local) time "31/3/2018 00:00:00" is passed to mktime() with tm_isdst = 0, the return value is (say) T sec and the tm structure is unchanged, because DST is not in effect at midnight. If the same call is performed with tm_isdst = 1, the return value becomes (T - 3600) sec and the tm structure is normalized to "30/3/2018 23:00:00", tm_isdst = 0. In recur_item_find_occurrence(), the normalized tm structure with wrong day and time is used in ensuing calculations, leading to wrong dates and the errors observed. The first mktime() call is used to calculate the "day span" of the occurrence before the occurrence itself has been determined. But once the occurence is known, the "day span" is easily determined, and there is no need for the first mktime() call. Events have no explicit duration. However, recur_event_find_occurrence() and recur_event_inday() set the duration of an event to DAYINSEC before passing it on to recur_item_find_occurrence(). The value is not correct on the day when DST begins or ends. The interpretation of the daylength should be left to the called function. Hence, duration is set to -1 to signal no (explicit) duration. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test cases for "Fix monthly and yearly recurrence algorithms"Lars Henriksen2019-09-063-1/+35
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Set time-of-day consistently to midnight for until dayLars Henriksen2019-09-062-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A day begins on midnight (inclusive) and ends on midnight (exclusive). A day as a whole is represented by the initial midnight, i.e. time-of-day is 00:00. On load of recurrent appointments (but not events) time-of-day for the until day is set to 23:59. For a newly created recurrent appointment the setting depends on the input method: time-of-day is set to 00:00 if until day is given as a date (day, month and year), but to time-of-day for the start day if given as an offset (+dd). The resulting behaviour is only visible in interactive use of calcurse as proved by the following scenario. 1) Create an appointment with start time 12:00, end time 11:59 (multi day). 2) Turn it into a recurrent appointment of type daily, frequency 3, until day +3. The appointment is correctly displayed with two 2-day occurrences three days apart. 3) Edit the appointment and select Repetition. Accept existing type, frequency and end day (now as a date). The second day of the second occurrence disappears. 4) Repeat 3), but set the end day as an offset (+3). The second day of the second occurrence reappears. The inconsistencies have been eliminated, and time-of-day for the until day is now always 00:00. Also, until day may equal start day, so midnights should be compared. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Document the HTTPS option in the sample configuration filek0ral2019-09-061-0/+4
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* DST: fix date_change() thoroughlyLars Henriksen2019-09-061-1/+2
| | | | | | | | Explicit setting of Daylight Saving Time should be avoided before as well as after the mktime() call. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix monthly and yearly recurrence algorithmsLars Henriksen2019-09-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | The calculation of the year of the most recent occurrence for year dates before the start date (disregarding the year) is incorrect for frequencies greater than one. The most recent occurrence (for a date as mentioned) is either too far or too close in the past. In most cases it does no harm because the most recent ocurrence is in the past and does not span the date (i.e. there is no occurrence on the day). But the following appointment shows the presence of the bug: 12/31/2019 @ 12:00 -> 01/01/2020 @ 12:00 {2Y} |new year The occurence on 1 Jan 2020 is missing, because the most recent occurrence is too far in the past (31 Dec 2018 instead of 31 Dec 2019). An occurrence appears on 1 Jan 2021, because the most recent occurence is too close in the past (31 Dec 2020 instead of 31 Dec 2019). A similar miscalculation affects the monthly rule as proved by 3/31/2019 @ 12:00 -> 4/1/2019 @ 11:00 {2M} |change of month Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix edit of empty exception day listLars Henriksen2019-07-101-1/+1
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Release 4.5.0v4.5.0Lukas Fleischer2019-06-173-2/+46
| | | | | Helped-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* po/: Translation updates from TransifexLukas Fleischer2019-06-1657-2059/+1429
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Treat recurrence item parameters as a unitLars Henriksen2019-06-163-23/+43
| | | | | | | | An edit session, and in particular, a cancelled edit session should encompass all parameters. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add Troubleshooting section to calcurse-caldav README.mdRandy Ramos2019-06-121-0/+10
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Use current value as default for periodic saveLukas Fleischer2019-06-071-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Disable view item/note bindings for dummy itemsLukas Fleischer2019-06-061-2/+2
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Use empty end date instead of 0 when editing repetitionsLukas Fleischer2019-06-062-17/+12
| | | | | | | | | 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>
* Add GitHub gimmicksLukas Fleischer2019-06-062-0/+19
| | | | | | Add a bug report template and a sponsor button to the GitHub interface. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Allow to omit end date in repetitionsLukas Fleischer2019-06-031-12/+9
| | | | | | Addresses GitHub issue #213. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix recurrent appointment end time when duration is zeroLars Henriksen2019-06-031-9/+4
| | | | | | | | | Fixes a regression introduced in 223810c (Major overhaul of appointment/event input routines., 2017-11-06) and 16d3032 (Refactoring update_duration/day_edit_duration., 2017-10-18). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* README.md: move demo to top of documentLukas Fleischer2019-05-311-5/+2
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update message catalogLukas Fleischer2019-05-301-8/+29
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Return at least two days in multiple days modeLars Henriksen2019-05-301-1/+4
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Mark selected day in the appointments panel in multiple days modeLars Henriksen2019-05-282-4/+5
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Remove appointments panel scrollbar in multiple days modeLars Henriksen2019-05-281-0/+4
| | | | | | | | | | A scrollbar gives the impression of a fixed list. But the list on display is automatically and silently changed as needed for movements in the panel or the calendar, thus creating the illusion of an endless list. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix sidebar width to accommodate calendar week columnLars Henriksen2019-05-282-5/+3
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix missing calculation of number of days on resizeLars Henriksen2019-05-281-0/+4
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix calcurse(1) typoFlorian Weimer2019-05-261-1/+1
| | | | | | Reported by James Woodward: https://marc.info/?l=linux-man&m=155848483126283 Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: replace readfp() by read_file()Lukas Fleischer2019-05-261-1/+1
| | | | | | Addresses GitHub issue #209. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: update OAuth2 documentation for extracting auth codeRandy Ramos2019-05-261-4/+4
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Automate the calculation of number of days to loadLars Henriksen2019-05-264-13/+20
| | | | | | | | | | | | Instead of having the user tell how many days to load, calcurse can calculate an overestimation from the running configuration (panel size, appearance of headers and separators etc.) The configuration variable conf.multiple_days is turned into a Boolean that switches the feature on and off. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Make separation of days conspicuousLars Henriksen2019-05-266-34/+60
| | | | | | | | | | | | | | | ... by adding a horizontal line from border to border above the day heading and turning the event separator into an empty line. The horizontal line is left out for the first day loaded. Also reduce the number of empty lines at the end of a day to at most one. A new configuration variable, header_line, turns the horizontal line on and off. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>