summaryrefslogtreecommitdiff
path: root/src/ui-day.c
AgeCommit message (Collapse)Author
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-07Update copyright rangesLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-27ui-day.c: Reorganize some free() operationsLukas Fleischer
Fixes regressions introduced in 21fc7a4 (Replace several uses of snprintf() by asprintf(), 2014-07-21). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-22Replace several uses of snprintf() by asprintf()Lukas Fleischer
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>
2014-07-16Warn when reloading with unsaved modificationsLukas Fleischer
Since the reload operation overwrites all changes, warn before reloading if there are unsaved modifications. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-09Do not highlight items on inactive windowsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-06-25Fix segmentation faultLukas Fleischer
This adds some more accurate checks to avoid a segmentation fault that occurred when accessing a nonexistent item. Fixes GitHub issue #7. Reported-by: Bromind <martin.vassor@hotmail.fr> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18Add default cases to some switch statementsLukas Fleischer
This squelches several compiler warnings. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18Reintroduce heading and separator in appointmentsLukas Fleischer
This re-introduces the heading (showing the POM and the current date) as well as the separating line between events and appointments. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18Add support for caption rows in list boxesLukas Fleischer
This adds support for rows that cannot be selected. Such rows can be used for section headings and the like. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18ui-day: Large-scale refactoringLukas Fleischer
Use the generic list box implementation for the appointments panel. This results in some major changes to how the items are printed. Note that this temporarily removes the heading showing the POM and the date as well as the separating line between events and appointments. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-13Pass date parameter to ui_day_update_panel()Lukas Fleischer
This allows for drawing appointment panels for days other than the current day. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18Add support for moving appointmentsLukas Fleischer
This adds an edit option to change an appointment's start time without changing its duration. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18update_start_time(): Allow for moving an itemLukas Fleischer
Add a parameter that specifies whether the duration should be updated when updating the start time of an item. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18Allow for making an appointment punctualLukas Fleischer
This allows for setting an empty end time when editing an item, converting it into a punctual appointment. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-05-14Fix a couple of translatable stringsLukas Fleischer
* Remove space before punctuation. * Use "TODO" instead of "ToDo". * Strip some formats to make sure lines are <=80 characters wide. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-05-14Support punctual appointments in the UILukas Fleischer
Allow for skipping the end date which means that a punctual appointment will be created. Implements FR#25. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-04-14Use tabs instead of spaces for indentationLukas Fleischer
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>
2013-02-14ui-day.c: Several minor simplificationsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14calendar.c: Rename to "ui-calendar.c"Lukas Fleischer
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>
2013-02-14apoint.c: Split out UI-related functionsLukas Fleischer
* Move UI-related functions to "ui-day.c". * Rename UI-related functions to ui_day_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14Rename appointment/event-related UI functionsLukas Fleischer
* Rename "interaction.c" to "ui-day.c" since it no longer contains todo-related UI functions. * Rename appointment/event-related UI functions to ui_day_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>