| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Included is a check of the 'until' date for pasted recurrent items.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The number of seconds in a day and daylength in seconds differ when
Daylight Saving Time is in effect on two days of the year. The day when DST
takes effect is 23 hours long, and the day when DST ends is 25 hours long.
In the latter case the date changing thread wóuld enter a loop in the last hour
before midnight (in the former it would set the date an hour too late).
The next midnight is calculated through mktime(), invoked by date2sec().
Wrong daylength prevented appointments from being stored in the day vector and
caused them to be displayed wrongly in the appts panel.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
| |
In the appointments panel, an appointment has a '-' to mark the time
span, and the description on the following line is slightly indented.
When the appointment is changed into a recurrent one, the '-' is changed
to a '*', making it easily distinguishable but the description also gets
a '*', thus breaking the pattern. Drop the extra '*'.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Do not try to access freed day items. This also fixes unexpected
selection changes after modifying appointments or events.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Use a different color for days with non-recurrent items in the calendar
panel. This makes it possible to easily spot days that actually contain
appointments.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Add a function that makes sure a string does not exceed a given display
size. If the string is too long, dots ("...") are appended.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Keep item selection when an item is moved (e.g. by changing the start
time or description).
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
* Order by start time first.
* Order items with the same start time by priority.
* Order items with the same start and priority by description.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
| |
Reported-by: Håkan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Start converting some variables and return values to store times from
long to time_t.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This adds a new item filter option --filter-pattern and removes the
whole -S parameter logic, while making -S an alias for --filter-pattern.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This squelches several compiler warnings.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This allows for more efficient access to items at specific positions.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Adds the -l/--limit command line option. Limits the number of appointments
and/or ToDo items displayed.
Signed-off-by: William Pettersson <william.pettersson@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
| |
Display appointments having the same starting date as ending date using
a specific format that hides the end time ("12:00" instead of "12:00 ->
12:00").
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Replace nested case differentiations by initializing every single
character for each flag separately and joining all characters
afterwards. This makes it much easier to extend the function later.
Note that the same approach is already used in display_item().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Add 2013 to the copyright range for all source and documentation files.
Reported-by: Frederic Culot <frederic@culot.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|/
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Calculate busy slices correctly if (recurrent) appointments with a
duration of more than 24 hours are used.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the result of localtime() is stored in a statically allocated
structure, data was overwritten when a context switch occurred during
(or shortly after) the execution of localtime(), potentially resulting
in critical data corruption. BUG#7 and BUG#8 are likely related.
This patch converts all usages of localtime() with localtime_r(), which
is thread-safe.
Reported-by: Baptiste Jonglez <baptiste@jonglez.org>
Reported-by: Erik Saule <esaule@bmi.osu.edu>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is no longer needed. Note removal, as well as exception handling,
have been moved to separate functions and the cut feature has been
merged into the deletion function.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the exception handling code from recur_*_erase() and move it to
separate functions recur_*_add_exc(). Create a wrapper function
day_item_add_exc() that can be used to add an exception to generic
items.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the note removal code from *_delete()/*_erase() and create a new
wrapper function called day_item_erase_note() that is be used to drop
the note being associated to an item.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Add a new function that can be used to copy one day item into another,
cloning the actual item that is linked.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of calling type-specific duplication handlers and inserting
clones of the original items when pasting, save the generic day item and
remove the actual item from the linked list, so that it can be inserted
anywhere else later.
The cut/paste buffer is moved to the interaction unit, item-specific cut
operations are changed to remove the item from the linked list only
instead of copying and freeing it. An item is only freed if another item
is cut before the current cut/paste buffer is pasted. All paste
operations are changed and reinsert the actual item instead of creating
a clone.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
This is no longer used and removing it saves a few bytes per item.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
These functions operate on arbitrary items. Pull out the code that gets
the currently selected item, get the current selection when one of the
functions is called and pass it as a parameter.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Always pass an item instead of passing a date and a index. This makes
use of the NULL callback that was added with one of the previous
patches.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change the data type of the "data" parameter from "long" to "void *" in
llist_find_*() signatures to allow for passing more complex objects.
Change all llist_find_*() invocations and callbacks accordingly.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a first step to clean up several compilation units and separate
the front end from back-end operations. All functions that require user
interaction are moved to a new compilation unit "interaction.c". Also,
following things are adjusted to the new layout:
* Make day_item_get_*() and a few other functions public, so that it can
be accessed from the new compilation unit.
* Use apoint_hilt(), todo_hilt(), etc. instead of directly accessing
static variables.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pull out code from apoint_switch_notify() -- especially the fallback
routine that calls recur_apoint_switch_notify() if the currently
selected item is a recurrent item -- and move it to a wrapper function
day_item_switch_notify().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Return the total number of items found instead of the pad length, since
this is used to store items in non-interactive mode as well now. The pad
length can still be calculated by using the appointment and event count
parameters.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|