| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This can be used to copy an item, so that it can be pasted somewhere
else later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
This allows pasting items more than once.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Pass an item instead of passing a list item index (analogous to commit
02c90ba53a658686bad5cb5f88c555d9eef06399).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a very simple cache, which is used to store the days that contain an
event or an appointment. This makes redrawing and browsing the calendar
panel much faster.
The cache has a size of 31 integers (which is equivalent to 124 bytes on
a 32 bit system and 248 bytes on a 64 bit system) and invalidates itself
if the current month has changed. If an item is added/changed/removed,
the cache needs to be invalidated manually by calling
calendar_monthly_view_cache_set_invalid(). Note that this will always
invalidate the whole cache, even if only one item at the last day of the
month was removed. This is a trade-off between simplicity and
efficiency.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
The item type parameter/return value no longer needs to be
passed/returned to interact_day_item_{paste,cut}(), since the type
descriptor is saved when cutting an item now.
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>
|
|
|
|
|
|
|
|
| |
These functions get the current selection, call day_*_item() and fix the
current selection on the appointment panel, so move them where they
belong.
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>
|
|
|
|
|
|
|
|
| |
Rename all interaction functions for the sake of consistency and add a
"interact_" prefix. Also, mark day_erase_item() static since it is not
used anywhere else.
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>
|