summaryrefslogtreecommitdiff
path: root/src/day.c
AgeCommit message (Collapse)Author
2011-10-21src/day.c: Allow editing an item's durationLukas Fleischer
We have the option to enter either an end time or a duration when creating an item - the same choice should be available when editing an item. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-21src/day.c: Allow cancelling an editLukas Fleischer
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>
2011-10-06Use parse_{time,duration}() where appropriateLukas Fleischer
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>
2011-10-06Use LLIST_{,TS}_FIND_FOREACH_CONT where appropriateLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-30Merge branch 'maint'Lukas Fleischer
2011-07-29Update the notification item in day_edit_item()Lukas Fleischer
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>
2011-07-21Refactor out note functionsLukas Fleischer
* 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>
2011-07-05Add day_pipe_item() functionLukas Fleischer
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>
2011-07-02Use constant for maximum UTF-8 character sizeLukas Fleischer
Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Make display_item() UTF-8 compatibleLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-28Do not try to display items with negative widthLukas Fleischer
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>
2011-04-22Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer
* 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>
2011-04-22Return -1 in io_file_is_empty() if file cannot be accessed.Lukas Fleischer
Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-19Use generic lists for recurring apointments and events.Lukas Fleischer
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>
2011-04-19Use generic lists for generic day items.Lukas Fleischer
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>
2011-04-19Use generic lists for events.Lukas Fleischer
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>
2011-04-19Use generic lists for appointments.Lukas Fleischer
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>
2011-04-12Drop empty notes after editing.Lukas Fleischer
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>
2011-04-05Compare pointers to "NULL" instead of "0".Lukas Fleischer
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-03Remove dead assignments spotted by clang-analyzer.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-14Overall indentation fixes.Lukas Fleischer
Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update website links to match the new URL.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update mail addresses to match the new mailing lists.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Remove date_sec2hour_str() from "utils.c".Lukas Fleischer
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>
2011-03-03Remove CVS "$Id" headers.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Fixed file permissions.Lukas Fleischer
2011-01-11Make parse_date accept several short forms.Lukas Fleischer
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.
2010-03-20All headers gathered into a single one. Typedefs suppressed.Frederic Culot
2009-10-16Bugfix in the way time slices are filled.Frederic Culot
2009-10-08More work on the weekly calendar view.Frederic Culot
2009-07-12stdbool header removed, unsigned type used insteadFrederic Culot
2009-07-05Switch to BSD license.Frederic Culot
2009-01-03more code cleanupFrederic Culot
2009-01-02code cleanupFrederic Culot
2009-01-02various bugfixesFrederic Culot
2009-01-01cut/paste feature adedFrederic Culot
fixed a 2-years old bug that made repeated items with exceptions to load uncorrectly in some cases (thanks Jan for reporting it)
2008-12-28Automatic periodic saves implementedFrederic Culot
2008-12-28Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot
memory usage
2008-12-15small bugfixes and a major one (freeze when deleting an appointment's note, ↵Frederic Culot
thanks Jan for reporting it)
2008-12-12code cleanupFrederic Culot
2008-12-08color configuration menu adapted to handle user-defined key bindingsFrederic Culot
2008-12-07Checks added while loading key bindings configuration.Frederic Culot
2008-11-16More work on implementing user-definable keybindingsFrederic Culot
2008-04-19some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot
2008-04-12Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot
2008-04-09Tony's patch concerning date format configuration importedFrederic Culot
2008-01-20Code parts related to item update rewrittenFrederic Culot
2008-01-17minor improvements and bugfixesFrederic Culot
2008-01-13Ability to attach notes to appointments and events addedFrederic Culot
2007-12-30Ability to attach notes to todo items addedFrederic Culot