| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Do not update an appointment's duration if the user cancels the prompt
at day_edit_duration(). Note that day_edit_duration() does not touch the
buffer if the prompt was canceled or an invalid value was entered,
resulting in the buffer variable being uninitialized in these cases.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After BUG#6 had apparently been closed with the screen locks introduced
in commit a80f8dcf2c6eb3b54658218bc081ee9694204dd5, some people still
had problems with random characters appearing in the notification bar.
This was obviously caused by wgetch() refreshing the screen if the
status panel was changed. From wgetch(3):
If the window is not a pad, and it has been moved or modified since
the last call to wrefresh, wrefresh will be called before another
character is read.
Since the wgetch(3) isn't thread-safe, there were race conditions
between the notification bar thread drawing to the notification bar and
wgetch() updating the screen. Introduce a (hidden) window that handles
all key presses and never gets changed in order to avoid this.
Also, call wins_wrefresh() explicitly in status_mesg(), since we can no
longer rely on wgetch() updating windows automatically.
Fixes reopened BUG#6. Note that this is a hotfix -- FR#26 has been
opened to ensure we fix this properly in the next major release.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
Conflicts:
src/day.c
src/recur.c
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Remove the cut function and merge it into the del-item command. This
allows for vim-style cutting/pasting.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for vim-style copy/paste registers which allows
cutting and copying multiple items without having to overwrite the
copy/paste buffer. Registers can be specified using the quote key ('"').
To access a register, type '"x' before a command where "x" is the name
of a register. If you want to copy the currently selected item into
register 1, type '"1c'.
Valid registers are 0-9, a-z, "-" and "_". Note that the latter is the
so-called black hole register, which works similar to the black hole
register in vim.
The register prefix key is currently hardcoded and cannot be configured.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
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>
|