aboutsummaryrefslogtreecommitdiffstats
path: root/src/day.c
Commit message (Collapse)AuthorAgeFilesLines
* src/day.c: Allow cancelling an editLukas Fleischer2011-10-211-22/+23
| | | | | | | | Once the user picked any property to edit, we didn't give him any chance to cancel editing. Abort if the user presses the escape key or enters an empty string. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use parse_{time,duration}() where appropriateLukas Fleischer2011-10-061-18/+14
| | | | | | | | | | | | | | Make use of these new helpers at various places. Note that this patch implies a few behavioural changes: * Short forms such as "23:" and ":45" are allowed when entering times. * Durations always need to be prefixed with a plus sign ("+"), with the nice side effect that you can now use "+3:30" to declare an appointment that lasts three hours and thirty minutes (that's much more convenient than "+210"). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use LLIST_{,TS}_FIND_FOREACH_CONT where appropriateLukas Fleischer2011-10-061-3/+3
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Merge branch 'maint'Lukas Fleischer2011-07-301-0/+11
|\
| * Update the notification item in day_edit_item()Lukas Fleischer2011-07-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | Ensure the start time as well as the description of the notification appointment are synced after editing it. We use notify_check_next_app()'s force parameter to ensure that the notification item is updated even if only the description was modified. Reported-by: Andraž 'ruskie' Levstik <ruskie@codemages.net> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Refactor out note functionsLukas Fleischer2011-07-211-22/+3
| | | | | | | | | | | | | | | | | | | | * Add new note_edit() and note_view() helper functions. Use these instead of copy-pasted code in *_note_edit(). * Move all note-related functions (note_edit(), note_view(), note_erase()) to a new source file "note.c". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Add day_pipe_item() functionLukas Fleischer2011-07-051-0/+55
| | | | | | | | | | | | | | | | Serializes an appointment or an event, prompts for a shell command and executes that command in a new process, piping serialized item data to its stdin. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Use constant for maximum UTF-8 character sizeLukas Fleischer2011-07-021-1/+1
| | | | | | | | | | | | | | Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Make display_item() UTF-8 compatibleLukas Fleischer2011-06-291-6/+15
|/ | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not try to display items with negative widthLukas Fleischer2011-06-281-0/+3
| | | | | | | Don't display anything rather than segfault if the appointment panel becomes too small (e.g. during a terminal resize). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer2011-04-221-1/+1
| | | | | | | | | * Update copyright dates (use 2004-2011 as date range everywhere). * Change copyright holder from "Frederic Culot" to "calcurse Development Team". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Return -1 in io_file_is_empty() if file cannot be accessed.Lukas Fleischer2011-04-221-1/+1
| | | | | | | Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for recurring apointments and events.Lukas Fleischer2011-04-191-56/+40
| | | | | | | | Use them instead of "recur_apoint_list" and "next" pointers in "recur_event" type variables. Includes some code simplifications and cleanups. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for generic day items.Lukas Fleischer2011-04-191-100/+88
| | | | | | | Use the new generic list implementation instead of "next" pointers in day_item type variables. Includes some cleanups and fixes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for events.Lukas Fleischer2011-04-191-11/+7
| | | | | | | Use the new generic list implementation instead of those insane "next" pointers in events. Includes some cleanups. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for appointments.Lukas Fleischer2011-04-191-35/+30
| | | | | | | Use the new generic list implementation instead of "apoint_list" everywhere. Simplify stuff and drop unused variables as well. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Drop empty notes after editing.Lukas Fleischer2011-04-121-0/+3
| | | | | | | | | Keeping empty notes doesn't make sense here. Also, there doesn't seem to be a simple way to erase notes yet. This will make calcurse delete any notes that are empty (meaning that they are either 0-byte files or contain nothing but a newline character) when returning from the editor. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Compare pointers to "NULL" instead of "0".Lukas Fleischer2011-04-051-14/+14
| | | | | | "bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove dead assignments spotted by clang-analyzer.Lukas Fleischer2011-04-031-13/+5
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Overall indentation fixes.Lukas Fleischer2011-03-141-272/+272
| | | | | | | Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update website links to match the new URL.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update mail addresses to match the new mailing lists.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove date_sec2hour_str() from "utils.c".Lukas Fleischer2011-03-041-1/+1
| | | | | | | | date_sec2hour_str() is superseded by date_sec2date_str() with "%H:%M" as date format string, so replace all invocations and remove that function from "utils.c". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove CVS "$Id" headers.Lukas Fleischer2011-03-031-2/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fixed file permissions.Lukas Fleischer2011-03-031-0/+0
|
* Make parse_date accept several short forms.Lukas Fleischer2011-01-111-2/+2
| | | | | | | | | Short forms are only accepted in interactive mode (e.g. when using the "Go to" function, editing a recurrent item's end date, and so on). Samples: "1/1/30" for "01/01/2030", "26" for the 26th of the currently selected month/year or "3/1" for Mar 01 (or Jan 03, depending on the date format) of the currently selected year.
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-64/+66
|
* Bugfix in the way time slices are filled.Frederic Culot2009-10-161-5/+11
|
* More work on the weekly calendar view.Frederic Culot2009-10-081-1/+66
|
* stdbool header removed, unsigned type used insteadFrederic Culot2009-07-121-5/+5
|
* Switch to BSD license.Frederic Culot2009-07-051-14/+26
|
* more code cleanupFrederic Culot2009-01-031-51/+34
|
* code cleanupFrederic Culot2009-01-021-10/+10
|
* various bugfixesFrederic Culot2009-01-021-3/+3
|
* cut/paste feature adedFrederic Culot2009-01-011-4/+70
| | | | | fixed a 2-years old bug that made repeated items with exceptions to load uncorrectly in some cases (thanks Jan for reporting it)
* Automatic periodic saves implementedFrederic Culot2008-12-281-2/+2
|
* Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot2008-12-281-38/+53
| | | | memory usage
* small bugfixes and a major one (freeze when deleting an appointment's note, ↵Frederic Culot2008-12-151-4/+8
| | | | thanks Jan for reporting it)
* code cleanupFrederic Culot2008-12-121-4/+2
|
* color configuration menu adapted to handle user-defined key bindingsFrederic Culot2008-12-081-7/+7
|
* Checks added while loading key bindings configuration.Frederic Culot2008-12-071-11/+11
|
* More work on implementing user-definable keybindingsFrederic Culot2008-11-161-17/+18
|
* some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot2008-04-191-6/+3
|
* Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot2008-04-121-685/+747
|
* Tony's patch concerning date format configuration importedFrederic Culot2008-04-091-16/+18
|
* Code parts related to item update rewrittenFrederic Culot2008-01-201-215/+231
|
* minor improvements and bugfixesFrederic Culot2008-01-171-11/+16
|
* Ability to attach notes to appointments and events addedFrederic Culot2008-01-131-56/+151
|
* Ability to attach notes to todo items addedFrederic Culot2007-12-301-8/+66
|
* routines updated to handle new window_t and window_e typesFrederic Culot2007-10-211-15/+15
|