summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-02-25ical.c: Small refactoringLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24Simplify code in status_ask_choice()Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24Use time_t instead of long in several placesLukas Fleischer
Start converting some variables and return values to store times from long to time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24autogen.sh: Do not use `sed -i`Lukas Fleischer
`sed -i` is not portable, use a temporary file instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24ical.c: Reduce nesting depthLukas Fleischer
Refactor the iCal parser to reduce nesting depth. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24Introduce starts_with() and starts_with_ci()Lukas Fleischer
Create user-defined functions to check whether a string contains a certain prefix instead of messing around with strncmp() and strncasecmp(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-23Make "Add Item" work from the calendar panelLukas Fleischer
Support the "Add item" key binding in the calendar panel and make it add a new appointment. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-23Redraw calendar panel when switching viewsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-23Support resize in all configuration menusLukas Fleischer
Add missing resize support in the configuration main menu and in the key bindings menu. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-23Add support for UTC times in iCal importsLukas Fleischer
According to the iCal standard (4.3.12 Time): UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC designator, appended to the time value. Parse such time values properly when importing iCal files. Fixes GitHub issue #3. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22Release 4.0.0v4.0.0Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22Use date_sec_change() for adding day deltasLukas Fleischer
Fixes tests range-002.sh and search-001.sh. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22Use LONG_MAX for invalid dates in parse_datearg()Lukas Fleischer
We cannot use -1 here since negative values are valid dates. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22po/: Translation updates from TransifexLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22po/doc/: Rebuild with new translate-toolkitLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-11calcurse.1.txt: Update details on note file namesLukas Fleischer
Since 5c6a00e (Use hash-bashed file names in edit_note(), 2011-08-02), the file name of notes is no longer generated by mkstemp. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-11Support weekday names as date specifiersLukas Fleischer
Allow for using shorthands like "Monday" as date specifiers. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07doc/calcurse.1.txt: Modernize synopsisv4.0.0-rc1Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07doc/: Do not lie about format.inputdateLukas Fleischer
Since aa682f7 (Rework command line argument handling, 2014-08-06), the format.inputdate option is no longer honored when parsing dates in non-interactive mode. Update the documentation accordingly. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07Update copyright rangesLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07Add a couple of shorthands to parse_date()Lukas Fleischer
We now understand the shorthands "today", "yesterday", "tomorrow" and "now" which might come in useful sometimes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07Describe modern equivalents to deprecated optionsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07Document new optionsLukas Fleischer
Document the query and grep modes, as well as the new filter interface, in the man page and in the user manual. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07Handle dates past January 19th, 2038Lukas Fleischer
Try to support dates past year 2038 on systems with 64-bit time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-10-17Only werase() calendar if month is changedLukas Fleischer
Optimize the monthly view by only erasing the window content when a new month is selected. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-10-10Let SIGUSR1 trigger a reloadTim Hentenaar
In an effort to better integrate the import process with external applications, it's desirable to have a mechanism by which external programs can trigger a reload of calcurse's data. This patch adds that functionality via SIGUSR1. The reload request is handled in the main loop. When the user is currently entering data, the request is delayed until the main loop is re-entered. Signed-off-by: Tim Hentenaar <tim@hentenaar.com> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-10-10Factor out item reload codeLukas Fleischer
Adds a new function io_reload_data() which can be used to reload all appointments and TODO items. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-10-10Add io_load_data() wrapperLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18test/data/ical-006.ical: Remove timezonesLukas Fleischer
This are neither needed for the tests nor supported by the iCal import. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18test/Makefile.am: Add missing testLukas Fleischer
We added ical-005 in f3fe3c8 (Gracefully handle all day events in iCal imports, 2014-08-18) but forgot to add entries to the Makefile. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18Correctly parse all types of iCal durationsLukas Fleischer
This was supposed to be fixed in 6ca2535 (ical.c: Simplify and fix ical_durtime2long(), 2014-07-28) but some cases were not covered. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18Retain comments in descriptions and config valuesLukas Fleischer
Comments should only be stripped if they start at the beginning of a line. We do not want to chop off an TODO item description or a configuration value. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18Gracefully handle all day events in iCal importsLukas Fleischer
Do not create two events when importing an event that lasts an entire day. Reported-by: Jörn Tillmanns <tillmanns@tuxzone.org> Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18Handle CRLF line endings in iCal filesLukas Fleischer
RFC 2445 mentions that CRLF line endings may be used in iCal files. Handle them properly when importing. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18test/: Fix date in ical-001Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-09Fix parsing of times in parse_datetimearg()Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-09Extend date formats for filtersLukas Fleischer
Allow for specifying both date and time in all dates and date ranges used in filters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-08Add --filter-{start,end}-rangeLukas Fleischer
These are shorthands for --filter-start-from/--filter-start-to and --filter-end-from/--filter-end-to. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-07Add a grep modeLukas Fleischer
This allows for printing a subset of the items in the data files by using filters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06args.c: Reword error messagesLukas Fleischer
Use the same error message if option arguments have the same data type and always add the violating value. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06io.c: Error out on non-existent calendar fileLukas Fleischer
Show an error message and die if the user specified a non-existent custom calendar file. This fixes some random hangs when calcurse is used in non-interactive mode within scripts. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Use backwards-compatible out format for queriesLukas Fleischer
Print TODO items before appointments in query outputs and add an empty line between the list of TODO items and the list of appointments. This is how items were printed before the big parser refactoring. Also, add a test to ensure we do not unintentionally change that format in the future. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Do not use filters in GC or import modeLukas Fleischer
Filtering items when running garbage collection or when importing data might result in data loss, so simply ignore filters here. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Rework command line argument handlingLukas Fleischer
Add a new range query mode (--days) and refactor the command line argument parser. Note: This slightly changes the behavior of some command line parameters, since date arguments no longer use the input date format from the configuration file! Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Allow for filtering TODO itemsLukas Fleischer
The item filters now apply to both appointments and TODO items. Also, add a new type mask "todo" and the following new filter options: * --filter-priority * --filter-completed * --filter-uncompleted Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Add a query modeLukas Fleischer
Add a new parameter -Q that can be used to print all appointments inside a given query range, followed by all TODO items. The date range can be specified using the --from and --to arguments. The start date defaults to the current day, the end date defaults to the day after the start date if not specified. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Add pattern filter optionLukas Fleischer
This adds a new item filter option --filter-pattern and removes the whole -S parameter logic, while making -S an alias for --filter-pattern. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-06Add item filtersLukas Fleischer
This adds the following filter options that allow for restricting the set of items that are read from the appointments file: * --filter-type * --filter-start-from * --filter-start-to * --filter-start-after * --filter-start-before * --filter-end-from * --filter-end-to * --filter-end-after * --filter-end-before Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-03po/calcurse.pot: Update message catalogLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-03Document compact mode and default panel optionsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>