1734 Commits

Author SHA1 Message Date
Lukas Fleischer
f15ac5ce09 Update maintainer email address
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2015-04-12 17:32:44 +02:00
Lukas Fleischer
776ef24075 Do not mark slice of end time busy
In weekly view, when computing busy slices, do not fill a slot that is
only hit by the end time of an appointment.

Suggested-by: Håkan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-11 10:37:54 +02:00
Lukas Fleischer
d354a4a05d Fix range checks in day_chk_busy_slices()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10 16:18:38 +02:00
Lukas Fleischer
f07ef77437 Highlight week number when the calendar is selected
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10 09:48:29 +02:00
Lukas Fleischer
7fea5451ad Show week numbers in the monthly view
Suggested-by: Håkan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10 09:45:04 +02:00
Lukas Fleischer
ebb8116056 Split out code for drawing week numbers
This allows for easily adding week numbers to other panel modes, such as
the monthly view.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10 09:42:34 +02:00
Lukas Fleischer
5ac3d43e9a Fix slice computation of recurring appointments
Reported-by: Håkan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10 09:24:44 +02:00
Lukas Fleischer
80502f02de calcurse.1.txt: Split out filter and formatting options
Move those options into separate subsections.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-03-26 17:39:07 +01:00
Lukas Fleischer
90e6c61252 ical.c: Small refactoring
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-25 16:19:14 +01:00
Lukas Fleischer
8c82fc3f6d Simplify code in status_ask_choice()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24 14:04:30 +01:00
Lukas Fleischer
0145ba12ec Use time_t instead of long in several places
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-24 13:57:47 +01:00
Lukas Fleischer
892d6edccd autogen.sh: Do not use sed -i
`sed -i` is not portable, use a temporary file instead.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24 13:34:17 +01:00
Lukas Fleischer
329ef1c22a ical.c: Reduce nesting depth
Refactor the iCal parser to reduce nesting depth.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24 11:56:55 +01:00
Lukas Fleischer
52779d2ec6 Introduce starts_with() and starts_with_ci()
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-24 11:17:38 +01:00
Lukas Fleischer
f91208c2f4 Make "Add Item" work from the calendar panel
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-23 19:59:58 +01:00
Lukas Fleischer
55bbbaefac Redraw calendar panel when switching views
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-23 14:18:36 +01:00
Lukas Fleischer
dca7a32557 Support resize in all configuration menus
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-23 14:02:52 +01:00
Lukas Fleischer
1ea97795be Add support for UTC times in iCal imports
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-23 10:46:16 +01:00
Lukas Fleischer
4efa3f3fbf Release 4.0.0
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22 11:34:11 +01:00
Lukas Fleischer
7a631b2b63 Use date_sec_change() for adding day deltas
Fixes tests range-002.sh and search-001.sh.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22 11:34:11 +01:00
Lukas Fleischer
a6c73232a8 Use LONG_MAX for invalid dates in parse_datearg()
We cannot use -1 here since negative values are valid dates.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22 11:34:11 +01:00
Lukas Fleischer
c84c911f5b po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22 10:40:05 +01:00
Lukas Fleischer
5352e80365 po/doc/: Rebuild with new translate-toolkit
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-22 10:40:05 +01:00
Lukas Fleischer
ad90792ff4 calcurse.1.txt: Update details on note file names
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-11 10:11:49 +01:00
Lukas Fleischer
6a88bdf7cd Support weekday names as date specifiers
Allow for using shorthands like "Monday" as date specifiers.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-11 10:08:51 +01:00
Lukas Fleischer
021fd642c9 doc/calcurse.1.txt: Modernize synopsis
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 12:01:35 +01:00
Lukas Fleischer
6c218943c6 doc/: Do not lie about format.inputdate
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-07 11:50:09 +01:00
Lukas Fleischer
9ef427693b Update copyright ranges
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 11:42:20 +01:00
Lukas Fleischer
4350494d3b Add a couple of shorthands to parse_date()
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-07 11:37:15 +01:00
Lukas Fleischer
283a86c217 Describe modern equivalents to deprecated options
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 11:12:16 +01:00
Lukas Fleischer
65963f96e8 Document new options
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-07 10:58:25 +01:00
Lukas Fleischer
a12833ec08 Handle dates past January 19th, 2038
Try to support dates past year 2038 on systems with 64-bit time_t.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 09:52:36 +01:00
Lukas Fleischer
4fd8f0b11e Only werase() calendar if month is changed
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-17 22:40:02 +02:00
Tim Hentenaar
7f62fb185c Let SIGUSR1 trigger a reload
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-10 09:33:57 +02:00
Lukas Fleischer
7f06c25230 Factor out item reload code
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-10 01:47:27 +02:00
Lukas Fleischer
8553a99161 Add io_load_data() wrapper
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-10-10 01:38:25 +02:00
Lukas Fleischer
61e2206dca test/data/ical-006.ical: Remove timezones
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-18 17:30:58 +02:00
Lukas Fleischer
b157f99179 test/Makefile.am: Add missing test
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-18 15:18:11 +02:00
Lukas Fleischer
76f151ff37 Correctly parse all types of iCal durations
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-18 15:18:11 +02:00
Lukas Fleischer
0a2c4d20fe Retain comments in descriptions and config values
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-18 12:27:22 +02:00
Lukas Fleischer
f3fe3c818c Gracefully handle all day events in iCal imports
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-18 12:20:09 +02:00
Lukas Fleischer
bcc820ea74 Handle CRLF line endings in iCal files
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-18 11:37:41 +02:00
Lukas Fleischer
e57b9654ff test/: Fix date in ical-001
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-18 11:35:01 +02:00
Lukas Fleischer
aca92e619d Fix parsing of times in parse_datetimearg()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-08-09 15:43:08 +02:00
Lukas Fleischer
519107dc47 Extend date formats for filters
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-09 12:56:13 +02:00
Lukas Fleischer
e1af76eb8d Add --filter-{start,end}-range
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-08 23:57:52 +02:00
Lukas Fleischer
c2a9292bf4 Add a grep mode
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-07 16:34:48 +02:00
Lukas Fleischer
9f24adfded args.c: Reword error messages
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-06 16:26:45 +02:00
Lukas Fleischer
8ead883c32 io.c: Error out on non-existent calendar file
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-06 15:59:15 +02:00
Lukas Fleischer
f9208c0b3d Use backwards-compatible out format for queries
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-06 15:48:02 +02:00