aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix end-of-string calculationLars Henriksen2018-05-241-1/+1
| | | | | | | | In keys_fill_missing() a pointer is walked through a string of space-separated character names, but misses the string-terminating null character. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: remove authorization data from logsLukas Fleischer2018-05-231-1/+7
| | | | | | | | 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>
* Run pre-load hook before testing for modificationsLukas Fleischer2018-05-232-2/+8
| | | | | | | | | | | 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>
* Unlock the save mutex as early as possibleLukas Fleischer2018-05-191-4/+5
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Use dummy variables to ignore return values of pair_content()Lukas Fleischer2018-05-101-2/+2
| | | | | | | | 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>
* ical: use the VALUE parameter in DTSTARTQuentin Hibon2018-05-101-1/+1
| | | | | | | | | According to RFC5545 3.3 (Property Value Data Types): "If the value type of a property is one of the alternate valid types, then it MUST be explicitly specified with the "VALUE" parameter." Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Allow for passing negative arguments to -dLukas Fleischer2017-12-131-10/+14
| | | | | | | | 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>
* Fix no-colour themeLars Henriksen2017-12-103-13/+8
| | | | | | | | | | | | | In colour customization, pressing cancel ('ESC' by default) will deselect all colours and put calcurse in no-color mode. For this to work, all colour changes must be performed with the routines custom_apply_attr()/custom_remove_attr(). Fixed for the getstring cursor, the scroll window border and the week number. In addition, the week number is unconditionally coloured as the rest of the calendar contents whether CAL is selected or not. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Scrollbar and right window borderLars Henriksen2017-12-103-23/+49
| | | | | | | | | | | | | | | | | | | When a scrollbar is on display in APP or TOD windows, the right vertical border (outside the scrollbar) is not highlighted when the window is selected. The scrollbar itself is always highlighted: - when APP or TOD is deselected - in configuration windows where borders otherwise are not The patch moves the scrollbar parameters from arguments of draw_scrollbar() to the function itself. The highlight argument to draw_scrollbar() was always 1. Instead call circumstances are figured out and highlight set accordingly. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Default colour as foreground colourLars Henriksen2017-12-104-4/+24
| | | | | | | | | | | | | In the default colour setup (white on black), white could only with great difficulty be used as customized foreground colour, because the colour pair COLR_CUSTOM then was identical to COLR_DEFAULT (default on default). This made it impossible to distinguish the selected element in lists. The patch turns on the video attribute bold when default is chosen as foreground colour. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update UTF-8 base codeLars Henriksen2017-12-072-23/+11
| | | | | | | | | | UTF-8 encodes characters in one to four bytes (since 2003). Because 0 is a valid code point, the decode function utf8_ord() should return -1, not 0, on error. As a consequence utf8_width() should return 0 for a continuation byte (as it did previously). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Avoid corrupting the sync DBLukas Fleischer2017-11-231-2/+9
| | | | | | | | | 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>
* Do not prompt when non-interactive import failsLukas Fleischer2017-11-231-17/+11
| | | | | | | | | | 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>
* Check for the year span 1902-2037Lars Henriksen2017-11-233-15/+34
| | | | | | | | | | | | | Reintroduce year check for systems with a 32-bit time_t type. Remove the lower limit (1902) for systems with a 64-bit time_t. This limits movements in the calendar (for 32-bit systems) and in no way ensures constistency of data. Commit a12833e (Handle dates past January 19th, 2038, 2015-01-19) removed the upper limit (2037) on dates but left the lower limit (1902). It did not ensure the support of the target system. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Function cleanup in custom.cLars Henriksen2017-11-232-42/+39
| | | | | | | Remove two remnants: custom_color_theme_name() and custom_set_swsiz(). Make static and rename custom_confwin_init() into confwin_init(). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix help for nine actionsLars Henriksen2017-11-151-4/+18
| | | | | | | | | | | | Seven actions were absent from display_help(). This meant that commands like ':help ^P' did not work. They now refer to general.txt, but are not all described there. For two actions, generic-copy/paste, the file name was misspelled. This solves Github issue #44. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* contrib/caldav/README.md: Fix localhost URIRaf Czlonka2017-11-111-1/+1
| | | | | Signed-off-by: Raf Czlonka <rczlonka@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Document build dependenciesRandy Ramos2017-11-101-0/+10
| | | | | Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Document external password optionRandy Ramos2017-11-101-0/+8
| | | | | | | Add information about the CALCURSE_CALDAV_PASSWORD environment variable. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Read password from env variableRandy Ramos2017-11-101-3/+4
| | | | | | | | Add the option to read the basic authentication password from the CALCURSE_CALDAV_PASSWORD environment variable. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Revert "calcurse-caldav: Add --password command line argument"Lukas Fleischer2017-11-081-5/+3
| | | | | | | | | | This reverts commit efd76a0d995292e48f5466fccada4901618f7d97. 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>
* calcurse-caldav: Add SyncFilter config optionSatvik Sharma2017-11-053-12/+53
| | | | | | | | The SyncFilter option filters the types of items synced from/to a CalDAV server by making use of the --filter-type command line argument. Signed-off-by: Satvik Sharma <satvik.sharma2@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Use /usr/bin/env in the shebangStefan Hagen2017-11-051-1/+1
| | | | | | | | | | | | It is best practice to use `/usr/bin/env python3` instead of a hard coded path. This will search for "python3" in the PATH environment variable. Most Linux distributions install python to "/usr/bin". Most BSDs to "/usr/local/bin". Signed-off-by: Stefan Hagen <github@textmail.me> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Remove unused argument from wins_other_status_pageLars Henriksen2017-11-033-3/+3
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Release 4.3.0v4.3.0Lukas Fleischer2017-11-023-2/+83
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* po/: Translation updates from TransifexLukas Fleischer2017-11-02222-1470/+1698
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* test/Makefile.am: Add missing data file to EXTRA_DISTLukas Fleischer2017-11-021-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* .travis.yml: Test under both Linux and OS XLukas Fleischer2017-10-291-0/+13
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Detect error on character inputLars Henriksen2017-10-291-1/+5
| | | | | | | | | | Previously an error from the character input routine wgetch() was silently ignored. It should still be ignored, but must explicitly be detected in order to be ignored. The issue came up in connection with terminal window resize. For whatever reasons ncurses returns ERR (as well as KEY_RESIZE) when wgetch() asks for input after a resize. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix multiple popup windowsLars Henriksen2017-10-293-11/+19
| | | | | | | | | | The window was not deleted if an "already in use"-key was detected, and a new one was created as the loop was reentered. Create/delete of the popup are moved outside the loop. A redrawwin() call is needed to have the window displayed again. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Parse time before date in parse_datetime()Lukas Fleischer2017-10-271-2/+2
| | | | | | | | | 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>
* Make parsing of date-time more strictLukas Fleischer2017-10-261-15/+20
| | | | | | | | | | | 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>
* Add parse_date_interactive()Lukas Fleischer2017-10-263-8/+13
| | | | | | | | | Add a wrapper around parse_date() which picks the current input date format as well as the currently selected day and passes both values to parse_date(), alongside with the parameters passed to parse_date_interactive() itself. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Replace NEWS by CHANGES.mdLukas Fleischer2017-10-262-769/+810
| | | | | | | Use Markdown syntax for the release notes and rename the release notes file from NEWS to CHANGES.md. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Remove recognized keys checkLars Henriksen2017-10-261-36/+12
| | | | | | | All keys known by ncurses can be bound. Thus the check for not recognized keys in custom_keys_config() becomes superfluous. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix spelling of "frequency"Lars Henriksen2017-10-233-10/+8
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Support key bindings for all escape keysLars Henriksen2017-10-232-84/+95
| | | | | | | | | | | | | | | | | | | | | All key names for ordinary ASCII keys as well as for escape keys (pseudo keys) are cached in a lookup-table, keynames[], at startup. Mapping between key names (strings) and key codes (integers) in keys_str2int and keys_int2str) is performed through this table. The key names used are those returned by the keyname() function of ncurses. But to accommodate some of the names to the three-letter space available in the status menu, four ordinary keys and the most common escape keys have calcurse abbreviated names: ESC, TAB, RET, SPC and LFT, HOM, PgU, INS, F1, etc. All keys known by ncurses can be bound. Thus the check for not recognized keys in the key configuration menu becomes superfluous. The only keys that cannot be bound, are those escape keys not known to ncurses, i.e. not described by the terminfo database for the terminal type in use. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Updates for UTF-8 key bindingsLars Henriksen2017-10-232-38/+38
| | | | | | | | | | | | | | | | | | | | | Code point mapping adjusted for multibyte characters to avoid the ncurses range 0-KEY_MAX. This includes three fixes: 1) test sequence in keys_assign_binding(), 2) reassemble multi-byte character in keys_wgetch(), 3) check for already in use in keys_assign_binding(). Rearrangement of code. The introduction of allocated memory in keys_int2str() has as a consequence that check for recognized ncurses pseudo characters now are in two places: keys_str2int() and custom_keys_config(). The latter was moved from keys_wgetch() to improve user information. More informative warning messages in custom_keys_config(). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Add --password command line argumentRandy Ramos2017-10-191-3/+5
| | | | | | | | The "--password" argument overrides the corresponding option in the config file. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Make delete key act as delete instead of backspacenobody2017-10-191-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add CTRL-G readline shortcut to getstring()Quentin Hibon2017-10-191-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Do not tie ISO 8601 week numbering to MondayLars Henriksen2017-10-171-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | The week number in the calendar panel is calculated according to ISO 8601. Hence, Monday is the first day of the week and the week number changes from Sunday to Monday. However, calcurse ties the week number not to Monday, but to the first day of the week as configured for display. Thus, when Sunday is shown as first day of the week, the week number is correct for Sunday, but wrong for the rest of the week (one behind). With this patch the week number always follows the mon-sun week as required by ISO 8601. A side effect is that when Sunday is displayed as first day of the week, and Sunday is the selected day, the week number displayed is invalid for the rest of the week (but changes to the correct one when the selected day moves forward). This raises the question whether the week numbering scheme should follow the "first day of the week" choice and use the American week numbering scheme instead of ISO 8601 when Sunday is the first day of the week. But that is for the future. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add calcurse-dateutilLukas Fleischer2017-09-081-0/+77
| | | | | | | | | | | | | | | | | Add a script to iterate over a certain date range, performing operations on each of the dates and printing the result. An additional string can be appended to each of the printed lines. The script can be used to create "extended recurrent events". For example ./calcurse-dateutil.py --date 2017-01-01 --range 365 --unique \ --append ' [1] Test event' bom next-weekday 3 skip-days 14 can be used to print an event for each third Thursday of each month in 2017. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update calcurse-caldav documentation for OAuth2Randy Ramos2017-09-081-0/+90
| | | | | | | | Append instructions and information on synchronization with OAuth2-based services, specifically Google Calendar. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Rename README to README.mdRandy Ramos2017-09-081-2/+2
| | | | | | | | | This ensures that the Markdown syntax is properly displayed by Github and other Markdown readers. Also added quotes to a couple of paths and a flag. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add OAuth2 support for calcurse-caldavRandy Ramos2017-09-082-0/+124
| | | | | | | | | OAuth2 authentication is completely optional. It is controlled by the AuthMethod option in the config file. Other required options were appended to config.sample. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Refactor calcurse-caldav to use httplib2Randy Ramos2017-09-082-29/+17
| | | | | | | | | | This will allow much more flexibility and less code duplication when adding OAuth2 support. OAuth2 support will require this library as it is a dependency of oauth2client. The documentation was updated to reflect the new dependency. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Change remote_wipe to delete objects individuallyRandy Ramos2017-09-081-1/+3
| | | | | | | | | Certain CalDAV servers prohibit a single DELETE request to be sent to the calendar collection root. Instead items need to be deleted one by one. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* URL encode href before saving to sync.dbRandy Ramos2017-09-081-1/+2
| | | | | | | | | | When pushing objects, the unencoded uri path would be saved into the sync.db. The unencoded path and the encoded path from the server would be seen as two different objects, causing both to be resynced unnecessarily. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* git-version-gen: Add default versionLukas Fleischer2017-09-081-8/+4
| | | | | | | | | | | Instead of bailing out early in the build process when neither a version file nor a valid Git repository is detected, use a hardcoded default version string. This fixes building from shallow clones or Git snapshots. Also fixes GitHub issue #22. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>