| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Add the AC_C_BIGENDIAN macro to determine endianness and set
WORDS_BIGENDIAN accordingly.
Fixes GitHub issue #397.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously only Sunday and Monday were allowed as the first day of the
week, and this was internally treated as a binary variable.
This patch allows for users to change the first day of the week to any
day.
Addresses GitHub feature request #321.
Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously only Sunday and Monday were allowed for the first day of the
week, and was internally treated as a binary variable.
This patch changes the backend so all days are accepted, a future patch
will allow users to actually select other days.
Addresses GitHub feature request #321.
Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sidebar has a numerical mimumum width that is statically defined,
and users may set the width of the sidebar in config by incrementing the
percentage of the screen between this minimum and a maximum value of
50%. However, internally the mimimum percentage could be set as low as
zero, and while that did not decrease the sidebar size below the
numerical minimum width, did mean that between 0 and the mimimum width
increasing the percentage had no visual effect to indicate change. Now
the mimimum percent is not decremented below the mimimum width.
Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
| |
Added the option to configure the format in which appointment time is
displayed. The setting is called "format.appointmenttime" under the
general settings menu. Setting defaults to previous behavior, which was
"%H:%M".
Signed-off-by: mercurialmoon <mercurialmoon@protonmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
This can be used to cycle backwards through windows (similarly to
generic-change-view).
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the keys file there are three possibilities for each action:
1. One or several keys are assigned to it
2. It is marked as UNDEFINED (new)
3. It is missing from the file
On load of the keys file, calcurse respectively
1. Assigns the key(s)
2. Assigns "UNDEFINED" (new)
3. Assigns a default key if possible
If default keys were assigned, the user is informed of the number of
actions affected, and the keys file is updated.
After load each action must either have keys assigned or be undefined.
If not, calcurse exits with a failure. If there are syntax/semantic
errors in the file, calcurse rejects the file and exits.
When an interactive user leaves the keys configuration menu, a warning
is issued if any action is UNDEFINED. The keys file is always updated.
Addresses GitHub issue #298.
Additionally: Description of concepts and data structures used for
keyboard keys and virtual keys (actions) as well as name changes and
comments to improve readability.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
| |
We do not want hook or notification commands to interact with the
terminal in any way. Create a new session for them.
Addresses GitHub issue #326.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disconnect stdin, stdout and stderr when running an external hook or
notification command. The previous solution of appending "<&- >&- 2>&-"
to the shell command line does not work if the command includes pipes.
Use shell_exec() in notify_launch_cmd() instead of a custom (and
incomplete) reimplementation of that command.
Partially addresses GitHub issue #326.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Add a function parameter to allows redirecting stderr in addition to
stdin and stdout. The parameter will be used with a follow-up change.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A general linked list function, llist_reorder(), is introduced that will reorder
a list after a list element has changed.
Some refactoring to avoid code dupliction.
Background
The four linked lists of appointment panel items (appointments, recurring
appointments, events, recurring events) are kept sorted by inserting elements
in order, either when they are first loaded from disk or when new are added.
The ordering is by start time (numerical) and description (alphabetical).
The user is allowed to change start time as well as description. A change is
committed directly to the list item (unlike cut/paste where an item is deleted
and then inserted). This may break the order.
The order property is used when events are loaded from the evenlist into the
day_item vector, see LLIST_FIND_FOREACH_CONT, and when looking for the next
upcoming appointment, see apoint_check_next().
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
There is a small typo in src/wins.c.
Should read `multiple` rather than `mulitple`.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
And fix item start day for prev command
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
DAY(t) is midnight (the day) of time_t t.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Set pointers to NULL after calling free() to prevent double free on
cleanup.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
| |
Other items may have been imported succesfully.
Adresses Github issue #323, last part.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
| |
Refactoring of ical.c: properties DTSTART, DTEND, DURATION, RRULE and EXDATE are
saved and only processed after encountering END:VEVENT.
Adresses Github issue #323, follow-up question.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
| |
Avoid using fixed-size buffers and strncpy().
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of the previous inconsistent and potentially nested menus, the
following message is now displayed when deleting an item:
Delete (s)elected occurrence, (a)ll occurrences, or only the (n)ote?
Options that are not available (e.g. because the item is not recurrent
or does not have a note) are omitted. For a non-recurrent item without a
note the message becomes
Delete (s)elected occurrence?
and is skipped if general.confirmdelete is disabled.
Implements GitHub feature request #308.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
| |
The p(rev) command finds the previous occurrence of a recurrent item, analogous
to the n(ext) command.
A bug in the next command is corrected..
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Refactoring and simplification only, no functional change. All error checking
and logging done before call of ical_store_event/apoint().
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Export now covers advanced recurrence rules and properties imported to a note
file.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Removes the parts of commit 'Extend use of note file for ical import' that
relate to STATUS. The STATUS property is (partly) supported for todos already.
Corrects insertion of a separator: always insert it before imported properties
(also when there is no description).
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0f3d198 (Interrupt periodic save when launching
process, 2017-09-08).
Stopping and starting periodic save when external/hook programs are run
causes deadlocks. The periodic save thread cannot be stopped/started at
will, but should be started once and run uninterrupted as long as
calcurse runs. Only if the configuration parameter is changed, must the
thread be stopped and possibly restarted.
The reasons are
- the start routine unconditionally starts a thread.
- the mechanism used to detect whether a thread is running or not, is
designed to be used by the main calcurse thread only and with only one
running thread of each kind (the thread ID of each running thread is
kept in a variable; if the thread is not running, the variable has the
main thread ID as value).
Any load hook will be run at the initial dataload, and the stop/start
calls will start a perodic save thread (this is true for the notify
thread as well). Later when threads are started, a second periodic save
thread is started (for the notify thread, a running thread is stopped
before restart).
When hooks are run by the periodic save thread, the stop call breaks
down, leading to two running save threads (if not the case already) and
subsequently to a deadlock when one thread tries to stop the other.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Hooks should not be run like external programs, but like load and save
operations that do not take possession of the terminal.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose is to make child_wait() reliable. The handler is meant for
the notify main thread, but signal handlers are shared by all threads.
In the calcurse main thread and the periodic save thread (hooks) the
handler and child_wait() will compete (if the signal handler kicks in
first, the waitpid() call in child_wait() will fail with errno ECHILD).
All child processes in the main thread, the notify thread, the periodic
save thread and the notify demon are explicitly waited for.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
| |
The option controls the welcome window and the export/import result messages.
The former is dropped. The latter are now always displayed unless calcurse is
invoked with the "quiet" option (-q).
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
| |
Shortened repetition type text.
Avoid "duration" in until-contexts (reserve it for appointment duration):
"duration" changed to "increment" in user texts as well as source.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Support has been implemented for recurrence rule parts BYMONTH, BYMONTHDAY and
BYDAY. A new test has been added.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conversion of COUNT to UNTIL was a simple calculation which assumed one
repetiton per period (day, week, month or year); it does not take exception
days and invalid dates into account. Solved by a new function which returns the
n'th occurrence of a recurrence rule.
In calcurse UNTIL is interpreted as a day (DATE), in RFC 5545 as a time of day
(DATE-TIME). This has implications when a recurrence rule has an occurrence on
the UNTIL day, see comment in ical.c
An "Import:" note is added when a multi-day event is imported and turned into a
calcurse all-day event.
Icalendar quotes in comments have been updated to RFC 5545.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
| |
The property parameter time zone identifier (TZID) is recognized in DTSTART,
DTEND and EXDATE and the DATE-TIME value converted to a local time. The time
zone identifier is logged in the note file.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
In addition, the prompt text is shortened.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
| |
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Better name: day for occur.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the order of a weekday in BYDAY rule expansion (like -5SA or 5SU
for monthly or 55WE for yearly) exceeds the number of available weekdays
in the period (month or year), rule expansion with negative order could
result in a floating point exception. The reason: the modified frequency
might become zero.
Solution. Check order against number of available weekdays and terminate
expansion early whenever possible (also for positive orders).
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch derives the item type (appointment or event) from the DTSTART
value type. It is then used to perform an extended check of date/time
values and reject non-conformant import files (like those reported in
Github issues #81, (calcurse) events.
The patch includes parsing and code corrections and minor refactoring.
Background:
Ical events are of two types, in calcurse called appointments and
events. RFC 5545 has no distinguishing names for them, but describes
them in section 3.6.1. The event type is derived from the value type of
the DTSTART property. The value type may be either DATE-TIME
(appointment) or DATE (event). If not specified by a VALUE property
parameter in DTSTART, the default value type is DATE-TIME. The value
type must be set explicitly to DATE to get an event. Other properties
and rrule parts must agree with the DTSTART value type (DTEND, DURATION,
EXDATE and UNTIL).
Previously the type of an imported event was derived from the format of
the DTSTART value. The DTSTART value type was not taken into account
when importing, and not specified for recurring events when exporting
(commit 0114289 solved it for events, see GitHub PR #97).
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
The generic command 'next' is introduced.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The help command has been updated for "repeat".
Context dependent, very terse information is built into the repeat
command (edit command) for display in the status bar when editing the
Weekdays, Months and Monthdays lists.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The day vector (or "day_items" vector) is used to load the appointments
panel with "day_items" (captions, appointments, events). A multi-day
appointment has several "day_items" in the day vector. This may also be
the case for a recurring item.
The day_item structure has a member "start", which for day_items for
recurring appointments is set to the occurrence found by
recur_item_find_occurrence(), and is used to tell days of a multi-day
appointment apart.
For day_items for recurring events it was set to "day" of the
recur_event structure (the same value for all occurrences) and not used.
The value is now the occurrence found by recur_event_find_occurrence().
The patch is backwards compatible and future-proof.
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|