aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui-calendar.c
Commit message (Collapse)AuthorAgeFilesLines
* Support durations in recurrence ending datesLukas Fleischer2016-02-261-20/+0
| | | | | | | When spending the end date of recurring items, allow date duration specifiers such as "+5d" or "+3w2d". Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update copyright rangesLukas Fleischer2016-01-301-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Highlight week number when the calendar is selectedLukas Fleischer2015-04-101-0/+4
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Show week numbers in the monthly viewLukas Fleischer2015-04-101-0/+4
| | | | | Suggested-by: HÃ¥kan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Split out code for drawing week numbersLukas Fleischer2015-04-101-97/+106
| | | | | | | This allows for easily adding week numbers to other panel modes, such as the monthly view. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use time_t instead of long in several placesLukas Fleischer2015-02-241-1/+1
| | | | | | | Start converting some variables and return values to store times from long to time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Redraw calendar panel when switching viewsLukas Fleischer2015-02-231-0/+6
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright rangesLukas Fleischer2015-02-071-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Handle dates past January 19th, 2038Lukas Fleischer2015-02-071-7/+1
| | | | | | Try to support dates past year 2038 on systems with 64-bit time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Only werase() calendar if month is changedLukas Fleischer2014-10-171-8/+6
| | | | | | | Optimize the monthly view by only erasing the window content when a new month is selected. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Replace several uses of snprintf() by asprintf()Lukas Fleischer2014-07-221-3/+3
| | | | | | | | Use asprintf() in some cold code paths. While allocating memory on the heap is a bit slower, using asprintf() is a bit more memory efficient and less prone to buffer overflow errors. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix calendar centeringLukas Fleischer2014-05-191-11/+9
| | | | | | | Adjust the positions of the weekly and monthly views inside the calendar panel. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* ui-calendar: Use scroll window implementationLukas Fleischer2014-05-181-53/+50
| | | | | | | | | Make use of the generic scroll window implementation for the calendar view. Note that this is useful despite the panel not needing a scroll bar, since the scroll window functions can be used to draw the panel border and take care of relative positions. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use tabs instead of spaces for indentationLukas Fleischer2013-04-141-573/+609
| | | | | | | | | | | This completes our switch to the Linux kernel coding style. Note that we still use deeply nested constructs at some places which need to be fixed up later. Converted using the `Lindent` script from the Linux kernel code base, along with some manual fixes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix braces in if-else statementsLukas Fleischer2013-02-171-6/+5
| | | | | | | | | | From the Linux kernel coding guidelines: Do not unnecessarily use braces where a single statement will do. [...] This does not apply if one branch of a conditional statement is a single statement. Use braces in both branches. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* calendar.c: Rename to "ui-calendar.c"Lukas Fleischer2013-02-141-0/+915
This unit belongs to the presentation layer -- rename the file accordingly. Also, rename calendar_*() to ui_calendar_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>